Alteryx Designer Desktop Discussions

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

Extract Names and Emails From String

Sidey1978
8 - Asteroid

Hi

 

I have a long list of unstructured data. In the first instance I need to extract the email addresses that are populated into a new column.

 

After using a text to column with Space as the delimiter I tried the following - IF Contains('@', [MAILING / BANKING INSTRUCTIONS1]) THEN [MAILING / BANKING INSTRUCTIONS1] ELSE "" ENDIF. But that didn't work...

 

Where an email is not contained I also need to extract the names from the list. Can anyone suggest the easiest way to achieve this?

 

I'd greatly appreciate any help that is out there!

 

Cheers

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@Sidey1978 ,

 

I'm posting a video to youtube for you 

 

Here's a workflow that uses this formula within a RegEx tool (config as PARSE)

\b(\w*\.{0,1}\w*\@[\w]+\.[\w\.]*)\b

 

Hopefully, this solves your challenge.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
jarrod
ACE Emeritus
ACE Emeritus

it looks like your contains formula is flipped, it should be contains([fieldName],'string you are looking for'), but if you are also trying to filter out names, then you can maybe look at the case structure of the words using regex. also, the contains may not work, because the first record is actually saying two people work @ a business (as far as i read that). so you might want to resort to regex there as well.

 

So all in all, you can do something like:

email field - regex_replace([contacts],'.*?\s*([a-z0-9\.-]+@[a-z\.-]+)*[),]*\s*.*','$1')  

 

then come back through and filter those results and apply another regex function to find names:

(\u\l*)

jarrod_0-1593196665670.png

 

Sidey1978
8 - Asteroid

Thanks @MarqueeCrew  that is awesome. 

 

I'm guessing that trying to extract the names from the list isn't feasible. Far too many variables to parse en masse?

 

Thanks again

Jonathan

Labels