Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Parsing using regex

lavorarchi
7 - Meteor

Hi would appreciate some help with parsing using REGEX the following data

 

Input Data

Total 123-456 Description of the total

500000 Description of item

600-123 Another line description

 

Irrespective of the lines in each cases I need to parse the "123-456" , "500000" and "600-123" in one column and in another column I need the remaining descriptions e.g. Total Description of the total, Description of item and "Another line description" using the example above. 

4 REPLIES 4
mpennington
11 - Bolide

I think this should work:

 

Parse Regex.jpg

 

Edit: Corrected image and workflow, missed one case. Sorry for the confusion.

 

lavorarchi
7 - Meteor

Hi @mpennington @thank you very much. I have noticed the 2nd row is not parsing the numbers from the description. How can I fix that? 

mpennington
11 - Bolide

Sorry about that, I fixed it above.

 

The RegEx:

REGEX_Replace([Input Data],".*(\d{3}-\d{3}|\d{6}).*", "$1")

 

lavorarchi
7 - Meteor

Much appreciated thank you.

Labels