Alteryx Designer Desktop Discussions

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

Parsing Data

D_Constantine
5 - Atom

Not much experience with Regex, but I'm sure there is an expression for parsing the below data.  Tried some suggestions that I read on the boards, but didn't work.

 

Z20585US-01 - ASSIGNING ZONE-BASED RANKINGS AND ACTIONS

Z20626 - SYSTEMS AND METHODS TO PREDICT

Z20667EP-02-AUTOMATED DETECTION

 

The one consistent thing is that I would like to parse where there is a number, dash, then letter (See bolded areas).  There might be a space between the number, dash and letter, but sometimes there isn't.  Ultimately, I would like to get rid of the bolded dash.

 

Thanks in advance for your help!

3 REPLIES 3
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @D_Constantine,

 

Try using (\d\s?-\s?[A-Z]) as your regex expression.

 

image.png

Further update to remove hyphens and whitespace:

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,
Jonathan

D_Constantine
5 - Atom

Thanks Jonathan.  I wasn't clear in my original message with what I hoping to achieve.  I would like for everything before and after the dash to be in two separate columns.

 

Column 1                    Column 2

Z05285US-01             ASSIGNING ZONE-BASED RANKING...

 

 

Jonathan-Sherman
15 - Aurora
15 - Aurora

That's not a problem at all! Please see the attached solution. The regex just needs to change slightly to (.*\d)\s?-\s?([A-Z].*)

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

 

 

Labels