Alteryx designer Discussions

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

Extracting portion of value with String Formula or RegEx

Highlighted
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?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@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 reboot. Order shall return.
Labels