UiPath email regex explaination?

Can anyone explain this regex used to get the email address? It is given in the ‘Matches’ activity.


1 Like

Hi @kumar.varun2

Actually regex pattern provided by uipath is seems to be matching each kind of email being present in string, it is some kind of u can say a Machine Learning [not really], where bot is applying all kind of combinations to extract the email from any given data , as u can see there is | symbol that actually signifies the or in regex pattern, so if one pattern fails, other pattern will check it and so on…

For a simple email like nived@gmail.com u can use a regex pattern like [\S]+@[\S]+
to extract the email data, but it may be matching to one particular type actually here when u use the regex pattern

Hope the explanation helps you

Nived N
Happy Automation

Refer this post:

There’s a website called https://regexr.com/, where you can paste this regex, select PCRE server in the regex engine(top right beside flags button). Then it gives explanation about most of the parts of the regex