In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Regex-Parse

garretwalters12
8 - Asteroid

Hello, having trouble using the regex tool to parse this data. With the below data how can I make it parse to look in the table below? Thanks!garretwalters12_0-1595859304997.png

Column 1    Column 2

0180
520
520
520
2030
2030
2030
2030
2030
3 REPLIES 3
echuong1
Alteryx Alumni (Retired)

You can use the text to columns tool with "-" as a delimiter. From there, use a data cleansing tool to remove leading and trailing whitespace, letters, and punctuation.

 

echuong1_0-1595860413543.png

 

garretwalters12
8 - Asteroid

Probably should have used more examples. "-" is not always the separator. Could also be "to" or just a space or anything else. Basically look for a regex to say give me the first number and second number in separate column and ignore all all other letter/punctuation/white spaces.

echuong1
Alteryx Alumni (Retired)

See attached for a solution using Regex. It essentially grabs the instances of numbers, up to two instances.

 

echuong1_0-1595862430111.png

 

Labels
Top Solution Authors