Alteryx Designer Desktop Discussions

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

Parsing a String Problem

DHB
Asteroide

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 RESPOSTAS 4
sjm
Asteroide
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
Bólide

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
Asteroide

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
Asteroide

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

Rótulos