Alteryx Designer Desktop Discussions

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

Regex Tool

anom23
7 - Meteor

So I was able to use this regex expression for the below file structure - (\d{15})(\d{10})(\d{4})(\d{4})(\d{8})(\d{15})(\d{10})(\d{10})(\d{2})\s+([C|R])

 

Old FIle - 000000300004200 0000000000 0821 0814 01110309 000004333292376 0000995504 0000000800 08 C

 

Which worked until I was provided with a new file structure that contains letters

 

New File - 000000324444587 0000000000 0821 0814 01110309 000004333292376 0000995504 0000000800 08 MAKER INFO FOR 323800007 C 

 

I attempted to use this expression but it does not parse - (\d{15})(\d{10})(\d{4})(\d{4})(\d{9})(\d{15})(\d{10})(\d{10})(\d{2})(\d{40})\s+([C|R])

 

Can anyone provide some insight at what I might be doing incorrectly?

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @anom23 

 

What is the expected output?

atcodedog05
22 - Nova
22 - Nova

Hi @anom23 

 

Is this the expected output

 

Workflow:

atcodedog05_0-1629292822325.png

 

Hope this helps : )

 

anom23
7 - Meteor

wow yes!! this is the expected output!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @anom23 

 

You can learn more on Regex in the below links

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

You can use this tool just type your regex here and it will give you the explanation https://regexr.com/


Cheers and have a nice day!

anom23
7 - Meteor

I think i spoke too soon.  The file seems to be in different format (windows) and it doesn't parse using the method you provided.  This is why i included  added numbers to account for the spacing. 

 

anom23_0-1629294286619.png

 

 

Labels