Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Regex Tokenize

moinshaik
7 - Meteor

Hi,

 

I would like to do regex for the below data to get them into 6 columns. Can anyone help...

 

moinshaik_0-1582659874459.png

Example the out put should be 

For Mahesh w/h leg will be in one column date in one column and four amounts in the other 4 columns.

4 REPLIES 4
T_Willins
14 - Magnetar
14 - Magnetar

Hi @moinshaik,

 

Can you provide the data in the native format (likely .txt)?  The RegEx formula will depend on if the blank spaces are tabs or spaces.

 

moinshaik
7 - Meteor

The sample data is in excel . each line of data is in one cell..... Its actually a data converted from pdf....

T_Willins
14 - Magnetar
14 - Magnetar

Hi @moinshaik,

 

Thanks for the sample data.  As long as your data stays in this format this should work.  It might need some adjustment on the full data set, so be sure to test.  I used RegEx parse instead of tokenize to get all the fields in one step and name them appropriately.  I added some cleansing at the end to get the amounts into numeric format.  If you just need it separated, then you don't need the last Multi-Field Formula tool, which trims off the leading dollar signs, changes brackets to negative numbers, and converts it to numeric format.

 

regex parse2.png

 

moinshaik
7 - Meteor

Thank you so much!! You are awesome.... Regex is one tool which I am in love with now.. Need to learn it as soon as possible.......

Labels