Alteryx Designer Desktop Discussions

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

Regex expressions

johndoe2487
6 - Meteoroid

I am confused about how to create a regex expression that matches whether the "email body" contains the words "username" and "password" anywhere in the field - the field is string.

8 REPLIES 8
DanM
Alteryx Community Team
Alteryx Community Team

I would suggest posting sample data as REGEX troubleshooting needs to see how the data is structured and what comes before and after what you want to parse out.

Felipe_Ribeir0
16 - Nebula

Hi @johndoe2487 

If you want help with your specific problem, please share a sample of the data. If you want to understand more or less how to solve by yourself, here is one example that you could understand better and adapt for your situation.

Input:

 

Felipe_Ribeir0_0-1666220200083.png

Workflow + result:

Felipe_Ribeir0_1-1666220227734.png

 

 

johndoe2487
6 - Meteoroid

johndoe2487_0-1666223275694.pngjohndoe2487_1-1666223307313.pngjohndoe2487_2-1666223325690.png

Need to pull the words from the email body field to answer the second half of number 5

johndoe2487
6 - Meteoroid

johndoe2487_0-1666223507881.png

 

Felipe_Ribeir0
16 - Nebula

Hi @johndoe2487 

 

Try to use the regex tool in parse mode with these expressions

 

(?<=username\:)(.*?)(?=\s)

(?<=password\:)(.*?)(?=\s)

 

Example:

 

Felipe_Ribeir0_0-1666223998238.png

 

johndoe2487
6 - Meteoroid

okay so that only gave null values and then if they weren't null they were just blank for both username and password

 

johndoe2487_0-1666224958454.pngjohndoe2487_1-1666224970003.png

 

 

Felipe_Ribeir0
16 - Nebula

Try the attached version

johndoe2487
6 - Meteoroid

Thank you! That worked, your help is greatly appreciated

Labels