Alteryx Designer Desktop Discussions

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

Extract Text from a string

soumyasinha
5 - Atom

I am trying to extract text from a string and a not sure how to use this. The string is below and I want to extract “DynamicNewUnlmtd” from this and put it in a new column.

 

CU@A_MG@0R_OT@DynamicNewUnlmtd_CM@A03_CV@AO_TA@0_IM@NA_LG@E_OB@15_AI@YVAC7226000_FF@N

 

 

@   Is there a better way of extracting this data using regex instead of suing delimnitators? 

 

2 REPLIES 2
JoshKushner
12 - Quasar

It looks like you have some very consistent patterns within your text. I can see some possible options for parsing:

  1. All text between '@' (Regex: "@(.*?)@")
  2. All text between '@' and '_': (Regex: "@(.*?)_") - Example Below
  3. All text between '_' and '@': (Regex: "_(.*?)@")

You can see "DynamicNewUnlmtd” has been parsed into column 3

 

If you want to test more Regex my favorite is regex101.

 

Flow:

Regex flow.PNG 

 

Result 2:

result.PNG

 

 

Regex 2:

regex ex.PNG

 

 

 

 

soumyasinha
5 - Atom

Hi Josh, 

 

This is awesome. I was doing text to column and further cleaning it up. Regex is the new thing i need to learn. Thanks a ton!

 

This has made my life super easy! Definately gonna do that 101

 

 

Best, 

Soumya

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels