Regex correction

Hi guys,

I am having one string as ,

Unread Message Mail Router DELIVERY FAILURE: User amr.pawar (amr.pawar@in.mae.com) not listed in Domino Directory 24.03.2020 12:21 2K

I want to extract email id from string , i am using below regex for same , but getting blank output,

string output_str=System.Text.RegularExpressions.Regex.Match( str,”[a-zA-Z0-9-_.]+@[a-zA-Z.]+”).ToString.Trim

Please let me know in case i am missing or wrongly doing anything.

Try this one:
(([a-zA-Z0-9_-.]+)@([a-zA-Z0-9_-.]+).([a-zA-Z]{2,5}))

getting error as
image

image

Use it in the matches activity

hi ,

still getting same error, please find attachedSequence1.xaml (4.4 KB) xml.

am.xaml (4.9 KB)

1 Like

You can use prebuilt regex in Matches activity

1 Like

yes thank you.

thanks a lot for your time and help.

1 Like

hey how i can covert this too string as i want to pass this email id to another flow

just add .tostring at the end of the MailOut.first and assign it to a string variable

1 Like