Split Activity : I need Only one line of string, Remove remaining string from an sentence

QAAnalyst
B.DateofJoining :31Jan,2020
C. Location :Bangalore
D. CTC :INR3,40,000/
E. Performance Bonus :INR64,000/-perannum

Hi, I have above text which is assigned to StringVar(SubstringValue), I want only “QA Analyst” and remove remaining entry.
Used, Desgination = Substringvalue.Split(vblf)(0)
Receiving Error : Options Strict disallows function from ‘String’ to ‘Char’
Any help much appreciated.

If StringVar contains the above text, use StringVar.Split(New String() {Environment.Newline}, StringSplitOptions.None)(0).

[quote=“Anthony_Humphries, post:2, topic:231292”]
StringVar.Split(New String() {Environment.Newline}, StringSplitOptions.None)(0) .
[/q

Thank you very much, It worked. another question, how can i learn this string manipuation, already learned by Uipath academy but covers only basic. Any website, blog or online tutorials suggestion would be very helpful.

The academy training teaches a lot of the string manipulation tricks you’ll need. This one is a bit special, and can be adapted to allow you to split on entire strings, rather than single characters.

Honestly, a lot of it is searching for what you need. In this case, I got the solution from How to split new line in string in vb.net - Stack Overflow .

But the most powerful tool for string manipulation is the use of Regexes. There’s a lot on Regexes at rexegg.com, and a tool for testing regular expressions at regex101.com.

1 Like

Here are most used function:

1 Like

Thank you for information.

1 Like

Thank you for everything.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.