Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Extracting email address using regex

kas
8 - Asteroid

Hello!

 

There are some solutions out here already, but I can't quite get mine to do exactly as needed.

I am trying to extract an email, and on occasion there is more than one, but also another email address I don't want. Data would look something like this:

 

Email Address: sjefferson@gmail.com

(1) Beneficiary Name: John Smith

(1) Beneficiary Street Address: 123 Main St

(1) Beneficiary Street City: Anytown

(1) Beneficiary Email: jsmith@gmail.com

(2) Beneficiary Email: ljones@aol.com

 

Results I need are jsmith@gmail.com and ljones@aol.com   But, NOT the sjefferson@gmail.com

 

I tried: Beneficiary email:(.+@\w+[\.\w?]+)

But that would only pull 1 email and if the one labeled Email Address was listed first, it pulled that one.

 

Thank you in advance,

Kim

 

 

 

 

16 REPLIES 16
phottovy
13 - Pulsar
13 - Pulsar

Sorry, I misread the question. I believe @CarliE 's updated expression should work now. I'm wondering if a better approach would be to parse the field names and values for all rows first. Then it would be pretty easy to extract the beneficiary email addresses as well as any other fields you may need in the future.

CarliE
Alteryx Alumni (Retired)

@kas ,

 

Attached is a workflow with 2 streams for 2 different ways

Carli
kas
8 - Asteroid

@phottovy 

 

I'll give @CarliE  updated version a try...for the sake of brevity, I didn't list all the unnecessary data lines I was extracting it from, it can get very lengthy, otherwise parsing all the rows would have been a good option.

 

Thank you!

kas
8 - Asteroid

@CarliE 

 

This is perfect...thank you for your patience, very much appreciated!

 

Kim

CarliE
Alteryx Alumni (Retired)

@kas No problem! Happy to help out :)

Carli
kas
8 - Asteroid

@IraWatt 

 

Thank you...yours is very close to what the final solution was - only missing piece was isolating just the ones with "Beneficiary" before email. 

 

Thanks so much!

IraWatt
17 - Castor
17 - Castor

No worries @kas glad we could help 😄

Labels
Top Solution Authors