Regex pattern and groups

hello everyone,

i have a problem with regex in uipath.
From regexr regular expression works with the following pattern:


basically i have to, within an email, recognize all existing patterns traceable to:

a1a, b3d, etc.

When I try to test it on uipath in the regex builder it finds me results unrelated to the expression, instead when I try to print the groups found, with the following expression:


it returns empty to me.

My goal is to pull out all the a1a patterns and insert them inside a string array, or a datatable.

Thanks in advance

Hi @andreus91 ,

Could you change the expression to the below and Check :


Use Matches Activity to get all occurrence of same pattern regex.
And than use RegMatche(0),RegMatche(1) to print all the elements of Regex match.

Where RegMatche is your output variable of Matches Activity in Uipath

kindly note: \w is matching letters and also digits

the a1a or the LetterDigitLetter Pattern?

in general we can do

System.Text.RegularExpressions.Regex.Matches(strInput,"\w\d\w").Cast(Of Match).Select(Function (m) m.Value).toArray