Extract mail address from string using regex

Hi Experts

I need to extract the e-mail address from a filename string looking similar to this:

“Firstname Lastname mailaddress@contoso.com_3_Receiver.pdf”

The result should be “mailaddress@contoso.com” - can this be achieved by using regex?

1 Like

Use this Regex pattern in Match Activity.


To check this, use https://regexr.com/



check this out, this wil extract any type of email:

1 Like

Hi @jacchr,

Considering this won’t be the only email ID format you get, I’ve prepared a regex for you which covers some possible and common formats:



Note: the regex doesn’t match “jacchr.rpa@uipath” as it doesn’t have a period mark (.) after @


Thank you all for your reply.

Based on your input I have put it into the following regex command:


I believe this should allow a-z, 0-9, . (period), _ (underscore) and - (hyphen) before and after @ and only a-z after the last . (period).