Alteryx Designer Desktop Discussions

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

Regex Help

pchong
8 - Asteroid

Hi community,

I am not an expert in regex, learning some parsing techniques.

I have attached a workflow with a sample text to parse.

(Edit : re-uploaded workflow to replace xlsx input to text input)

S1.png

 

 

This is what I have on the regex tool.

(\w+), (\d+\/\d+\/\d{4}), (\d+)(?:\*(\d+\.\d+))?(\*(\d+))?\[(\d+)\]$

 

However, the rows of my output are all null.

Kindly provide assistance to achieve the desired output.


Thanks!

4 REPLIES 4
binuacs
20 - Arcturus

@pchong can you upload the input file separately?

pchong
8 - Asteroid

Sure, here is the sample input.

aatalai
14 - Magnetar

Try this

 

(\w+)\, (\d+\/\d+\/\d{4})\, (\d+)(?:\*(\d+\.\d+))?(\*(\d+))?\[(\d+)\]$

pchong
8 - Asteroid

I was able to fix it with (\w+),(\d{1,2}/\d{1,2}/\d{4})(\d+)[*](\d+\.\d+)[*](\d+)[[](\d+)

Thanks!

Labels