Alteryx Designer Desktop Discussions

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

Parsing a String Problem

DHB
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.

4 REPLIES 4
sjm
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.
vishwa_0308
11 - Bolide

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

Syarifhidayat
8 - Asteroid

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.

DHB
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