Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!
SOLVED

Parsing a String Problem

Highlighted
8 - Asteroid

Can anyone help me parse a string that look like...

 

3720_EDUC_1007_PS_TU01_1

 

...so that I get everything before _PS?

 

Thanks in advance for your help.

 

Best,

 

DHB.

Highlighted
8 - Asteroid
Here are a couple options using RegEx. If PS is always in the data, both options works. If not, the second option works.
Highlighted
Alteryx Certified Partner

Hi @DHB,

 

please refer the below screenshot, you will get all the data before "_PS".

example- "3720_EDUC_1007"  out of "3720_EDUC_1007_PS_TU01_1"

 

Regex.png

 

Best,

Vishwa

Highlighted
Alteryx Partner

hi @DHB,

 

I has attached one workflow but have two different output.. feel free to look at it and decide which output you want to use.

Highlighted
8 - Asteroid

Thank you all for your help.  I'm using the Regular Expression=  (.*)_PS version as it seems simpler and all entries in my data contain the _PS part.  I've saved  the version which accounts for it not being there, I'm sure I'll need that for some other data prep before long.

 

Thanks again.

 

DHB

Labels