Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Extracting portion of value with String Formula or RegEx

RFernando
5 - Atom

Hello world,

 

Recently I found myself struggling trying to pull the values "dba, cyb, and pmi" from the below emails. There are variations of these values (dba, cyb, and pmi) positioned in the same location within all other records. Luckily every email ends with @huh.com

 

Obviously, I could go the long way around using multiple tools but I was hoping I could simplify and use a formula expression or RegEx. Is there a more efficient way to pull this out there?

 

john.g.doe.dba@huh.com

jane.j.do.cyb@huh.com

jim.r.does.pmi@huh.com

 

Thoughts?

1 REPLY 1
MarqueeCrew
20 - Arcturus
20 - Arcturus

@RFernando,

 

Sorry for the delay in responding....

 

regex_replace([Field1],".*\b(dba|cyb|pmi)\b.*",'$1')

this should work for any text field.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

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