Alteryx Designer Desktop Discussions

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

Need help in Regex expression

EN6924
10 - Fireball

Hi All,

 

My source data has rows like -

 

EN6924_0-1671004440259.png

 

A sample input I've taken.

 

The output should be in 2 columns and it should be dynamic -

 

EN6924_1-1671004541149.png

 

Please help using Regex only.

 

 

6 REPLIES 6
EN6924
10 - Fireball

A little typing mistake on the above, output columns should be like -

 

EN6924_0-1671004997290.png

 

flying008
14 - Magnetar

Hi, @EN6924 

 

What is your logic with the output ?

EN6924
10 - Fireball

EN6924_0-1671008274279.png

 

I can able to build the build column this way

Christina_H
14 - Magnetar

Based on your output, I think these are the formulas you need.  You've specifically requested RegEx, but you can also do this without.

 

Column 1: if REGEX_Match([Source], "[^\|]+") then [Source] else Null() endif

Column 2: if REGEX_Match([Source], "[^\|]+\|MAPP") then [Source] else Null() endif

EN6924
10 - Fireball

Thank you very much, it worked perfectly the way I wanted.

 

I tried to use a Filter tool -

 

Column 1: !REGEX_MATCH("[Source]", "\w+\|.+")

Column 2: REGEX_MATCH("[Source]", "\w+\MAPP")

 

EN6924_1-1671009288605.png

 

EN6924
10 - Fireball

Cool.

 

EN6924_0-1671009620316.png

 

Labels