Extracting the required characters from a string

uiautomation
studio

#1

Hi All,

Note: I’ve just gone through the topics discussed here for String extract using Substring, but couldn’t find a solution for my ask. Please excuse if this has been discussed already.

I’m a beginner to UiPath and I’m stuck with extracting the required characters.

I have a workflow where i need to extract some data from a string after the ": " wherein the data after ": " doesn’t remains constant so as the count of the entire string. I’ve used count function and substring, but had no luck.

Can someone please help?

Eg:

Topics: xxx (or) Topics: YYYY //Not sure what data comes in as this detail usually comes thro’ email

So, i need a way where i can get the characters after ": " irrespective of the length that comes after the ": ". I tried Trim and Substring options, but i was not able to get the required output.

Plzzz help !!

Thank You!

SM.


#2

@safs_1 Split(UrStringVariable,":") it gives array u can print arrayvariableName(1) to get required output

or

Split(UrStringVariable,":")(1) it gives whatever comes after :


#3

You can use Regex formula to select it:
(?<=: ).*
https://regex101.com/r/2DT6LX/1

Use an assign to get the value:
Assign = System.Text.RegularExpressions.Regex.Match(“Title: adfasf”, “(?<=: ).*”).ToString


#4

That did worked perfectly and as expected…!! Thanks much :slight_smile: