Hi, I would like to get all text before the exact expression:
e.g. with the sample string:
It should get:
Btw. what kind of Regex does UiPath use (so I can better search Google in future)?
Thanks a lot
Try using this in two different assign statements,
System.Text.RegularExpressions.Regex.Replace(result, “\s+”, " ")
Regex.Match(result,"(?<=This is a computer generated Invoice.).*).Value
For your problem , simple split function will work.
- Split by “21.a” , it will return a string array
- get the 0th element from the array
To answer your 2nd question, Regular expression is not language specific. In UiPath you can use Is Watch activity for regular expression.
Also replace 21.a Offer after?<=
@Tuhin_Samanta Aren’t there different standards for regex expressions? I saw solutions in the web that didn’t work for me in UiPath.
Yes, there are some different standards for that. But they are not unified. In UiPath you can use RegEx for C#. It should work.
Thanks a lot for the advice
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.