Alteryx Designer Desktop Discussions

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

Extracting Data before an inconsistent special character

lrhatigan
6 - Meteoroid

Hi, 

 

I am trying to extract all data before a space or special character from a text field, however the text field can contain various formats with multiple inconsistent breaks in each row. Can anyone recommend the best approach given that the special character will not always be the same?

 

In the event that the first character is a special character, this should be ignored and all data before the next special character extracted (last example below)

 

DataRequired Result
C1_ABCD_EFGHC1
A2C TestDataA2C
ABC *ABC
12AA-Number and letter12AA
[AB]-SampleDataAB

 

Thanks!

3 REPLIES 3
DataNath
17 - Castor

Hey @lrhatigan, if you just want the first alphanumeric group then you could use something like the following:

 

DataNath_0-1676554671032.png

 

([A-Z0-9]+)
BS_THE_ANALYST
14 - Magnetar

@lrhatigan RegEx can help here :-)

BS_THE_ANALYST_0-1676554733298.png

 

 

lrhatigan
6 - Meteoroid

Thanks. Both methods giving desired result - appreciate the help.

Labels