Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

URGENT : REG-EX PARSING

vaibhav_jain
8 - Asteroid

Hi,

 

I have attached a sample text file having the different fields lengths. Also attached a column definition file explaining each column length.

 

I want to parse the file & separate based on columns i.e. A,B,C etc.

 

Please advise the syntax in reg ex tool.

 

Regards

Vaibhav Jain

 

3 REPLIES 3
vaibhav_jain
8 - Asteroid

Hi,

 

Desired Output

 

Column A                        Column B                  Column C         Column D

 

5679000765430000         67890123456000400    00/00/0000        12/05/2016

 

Regards

Vaibhav Jain

JohnJPS
15 - Aurora

Hi @vaibhav_jain,

 

If the given fields are always in the same place in the file, you can pick those locations in the input tool... don't select any particular file type, and on this screen:

 

Capture.PNG

 

... make sure to read it as a "fixed width file" ... this will take you to another screen where you can simply point-and-click the field lengths:

 

Capture.PNG

 

In my screen shot, I've clicked in the first 4 fields... you can scroll right and easily click in your entire field list.  Make sure to adjust the "Record Length" such that you can see everything.

 

Hope that helps!

vaibhav_jain
8 - Asteroid

Hi John,

 

Let me also try this method. Will get back to u incase of any query.

 

Thanks for sharing the solution.

 

Regards

Vaibhav

Labels
Top Solution Authors