RegEx Help


Badge +7

Hi,

I'm trying to extract just the email addresses from a string that looks like the following:

"Tester AM 1 <svc_xxxxam1@de.myco.com>;; Tester PM 1 <svc_xxxxpm1@myco.com>;"

I can't figure out the regex required.  Any help much appreciated.


3 replies

Userlevel 2
Badge +11

Have look at this post: https://stackoverflow.com/questions/4373508/regular-expressions-how-to-find-the-bit-between-the-in-an-email.

You also may consider splitting it into a collection and apply the regex from the post on each collection item.

Userlevel 6
Badge +16

Hi Eric:

I have tried it on regexr.com and seems to work.

/([w.-_]+)?w+@[w-_]+(.w+){1,}/igm

Sample here >>> RegExr: Learn, Build, & Test RegEx 

Badge +7

Seems to do the trick Fernando Hunth‌.  Thanks!

Reply