community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Parsing a String Problem

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.

Asteroid
Here are a couple options using RegEx. If PS is always in the data, both options works. If not, the second option works.
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

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