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]$)
Solved! Go to Solution.
Hi @Daflinders,
Your regex expression is working to parse out the shift_test and reason code values? (I've used a different one myself):
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:
False:
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
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
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