Regex pattern - Fetch Email from a Webpage

Hi, Can someone help me in writing correct regex pattern to fetch only email address from the below info picked from a webpage. I want only email IDs as final output, please help me.

Name: Alberto Wynk
Email: [albertowynk@wethy.edu]
Curriculum: 2023 BU

Name: Alberto Nick
Address: Campus Box 1146
Title: University Fellow
Department: Mathematics - A&S
Email: [alberto.nick@.wethy.edu]

Name: Alberto syen
Email: [alberto.syen@wethy.edu]
Curriculum: GR

Hi @Hema_Latha

(?<=Email:).*

Thanks
Ashwin.S

1 Like

Thank you Ashwin. As I am still learning on RegEx, can you send the full expression if possible.

image

Please check the image, so that I can use the expression direclty in "E-mail assign " activity. Kindly help.

Hi @Hema_Latha

Use matches activity and pass the regex pattern and string value

Thanks
Ashwin.S

Hi @Hema_Latha

Check this as @AshwinS2 said

([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,6})
use this pattern to extract email id from the string

Please confirm whether am doing correctly…

Also this is the workflow created for the same.

image

RegexPatternCheck.xaml (5.8 KB)
check this if this what you are looking for!

you’re good!
just add this (?<=Email:).*
if you dont want [ ] you can use my sample workflow!

is it working??

please find the attached.
Sequence1.zip (1.6 KB)

Hi,

You can easily get the pattern from RegEx Builder of Matches activity as the following.

Then, the following will help you.

Note: item in for Each shoud be System.Text.RegularExpressions.Match type.

Regards,

Yes, Pradeep. It is working, thankyou so much :slight_smile:

1 Like

cheers @Hema_Latha
Happy learning!

Thank you!

1 Like

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