String Manipulation12

Hi Guys,
I have a Text that says the following:

"Hereby my Contact Details.

Lastname: [Your Last Name]
Firstname: [Your First Name]

Thank you"

I need to get the Last and the first name via String Manipulation.

So far i have this: Text.Substring(Text.IndexOf(“Lastname:”)+9).TrimEnd

However, this gives me the last name + all the text that comes after.

Thanks for your help!!

1 Like

@Robin112 For this you can use regular expression.

Can you explain? I have never used regular expression

1 Like

@Robin112

Regular expression is a sequence of characters that define a search pattern mainly for pattern matching with strings. To get Lastname use this regex

1 Like

Try Regex Expressions and Match Activity in Uipath .You can get examples in forum to…

Hi @Robin112,

Please check the below xaml file

Sequence2.xaml (4.9 KB)

Thank you,
Gulshiyaa.

1 Like

Hi @Robin112

Try to follow this link for your reference.

String Manipulation

cheers :smiley:

Happy learning :smiley:

1 Like