Alteryx Designer Desktop Discussions

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

Regular Expression Parse troubleshoot

Daflinders
7 - Meteor

I have followed the tutorial for the parse tool and I have checked it in a regular expression reader but it still leaves blank columns. My data isn't clean so I'm trying to weed out stuff that doesn't follow this format.

 

Example of what data looks like

 

1 T2

2 52

1 61

3 5

BL

TJ

2 11

3 T5

102142

43244

 

The data is supposed to have either a 1,2,3 (the shift) a space and then either 2 digits, 1 digit or a T and then a digit. This is the regular expression I wrote

(^\d)\s([T\d][\d\s]$)

Daflinders_0-1585840144092.png

 

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

Hi @Daflinders,

 

Your regex expression is working to parse out the shift_test and reason code values? (I've used a different one myself):

 

image.png

 

However you wanted to weed out values that don't match the pattern you could use a regex_match function inside a filter tool:

 

REGEX_Match([Values], '^[1-3]\s\d{1,2}|(?:T\d)')

 

True:

image.png

 

False:

 

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

Daflinders
7 - Meteor

Hi Jonathan,

 

I am unsure what is different between what I have and you but it still doesn't want to parse the data like I want

Daflinders_0-1585842309788.png

 

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Daflinders,

It looks as though there may be multiple spaces between your Shift_Test and Reason Code? Could you change your \s to \s+

 

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

 

Regards,

Jonathan

Labels