Regex 'Matches' activity doesn't return values as intended and shown in the Test window

Hi Masters,

I’m having trouble with a Regex Matches activity, as it doesn’t seem to work as intended. Could you please help with suggestions?

You can see below that the RegEx Builder Test window shows that the regex expression matches 1 non-capture and 1 capture group.

I also tried to use Assign = System.Text.RegularExpressions.Regex.Match(input, pattern)
2021-12-06 16_08_43-finance-REF-calculate-hashes - UiPath Studio Community

However, after I run the workflow, both activities do not return any value:
2021-12-06 15_48_55-finance-REF-calculate-hashes - UiPath Studio Community

Any ideas why i’m not getting the expected result?

I probably can get the output using substring, but was wondering why this isn’t working.

Many thanks


What do you intent "\1" at the end of the pattern? I suppose it isn’t needed.


It’s used only in the Assign activity, to retrieve 1st group matched (as a test). But still doesn’t work, with ‘\1’ or without it.


Can you share you text, if possible as a file?


give a try on this:

 strText = "ABC Client ID: AZ79829 CDE"
 "ABC Client ID: AZ79829 CDE"
 strPattern = "(?<=Client ID: )[A-Z\d]+"
 "(?<=Client ID: )[A-Z\d]+"
 myMatch = Regex.Match(strText, strPattern)
1 Like

Yes Sir, works like a charm. Thank you!

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