Fetching specific data of a string

Hi guys,

Hope everyone is fine :slight_smile:

Using the Get Text I managed to get a text just like this: ABC0001 - UIPATH TEST
But I need to fetch everything before the β€œ-”, in other words I only need the ABC0001. I think that I should use a regular expression to do so, but to be honest regular expressions are my weakspot :sweat_smile:

If anyone could give me a sample of the code I’d appreciate a lot.

Thanks in advance :+1:

@Yan_Boos Try this

Assign str1 = " ABC0001 - UIPATH TEST”
Assign str1 = str1.Split(β€œ-”.ToCharArray)(0).ToString

1 Like


It worked :smile:

Thanks for the support my dear colleague


1 Like

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