Matches activity not working with the regex

The regex expression I am using is this (?<=Code\s)\w+\s\w+?(?=\s\b\d{8}\b)
It highlights the required text in Test Text section of regex builder window in uipath, but after running the xaml file the “matches” activity does not capture it. The count of values matched is zero.

@kumar.varun2 - Could you please share your input text, so that we can take a look?

Code
Hewlett Adam 37301391 93333333 08-Apr-2021

@kumar.varun2 - Please check this…

As an alternate you can try this …Say, if you three words before the digits your pattern won’t capture…

Regex Pattern Link

It is working. It is also working with (?<=Code\s\n)\w+\s\w+?(?=\s\b\d{8}\b)
\s\n is required after Code.
Thanks a lot.

1 Like

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