We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Extract specific text from a cell - output in another column

andyb
6 - Meteoroid

Hi All,

 

Apologies if this has been addressed before but I have a question about extracting out a specific string from cells in a column and outputting to another column. The string type could appear multiple times within the same cell. 

 

In the attached sample sheet, I'd like to pull out any string that is '[TR.....]' and add to my output column (column D)

 

Any suggestions/help would be much appreciated. Thanks!

 

 

2 REPLIES 2
neilgallen
12 - Quasar

because your text could appear multiple times in the same string, you'd want to use the tokenize capabilities of RegEx. The attached workflow gets you there, based on your example (however I think your proposed output column contains an error).

 

regex token.PNG

 

You are setting you RegEx pattern to be (\[TR_\d+\]).

 

Essentially, look for a bracket followed by the letters "TR" and an underscore, then at least one (but could be multiple) numbers, then a closing bracket. Because of the notation of RegEx, the "\" needs to proceed each bracket.

andyb
6 - Meteoroid

that did the trick. Thanks so much!

Labels
Top Solution Authors