Alteryx Designer Desktop Discussions

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

RegEx - Identify/split data into columns

RajatK
8 - Asteroid

Hi,

 

I am new to RegEx and I have the below data which needs to be split into different columns. The challenge I am facing is that the Account description (2nd column) is not in a consistent format (i.e., the number of strings/words in the relevant description column are not consistent). 

RajatK_0-1671195028084.png

Could someone please help me with a solution to this? Thank you in advance!

 

 

3 REPLIES 3
ShankerV
17 - Castor

Hi @RajatK 

 

Please find the below output you are expecting.

 

ShankerV_1-1671195771472.png

 

 

ShankerV_0-1671195733050.png

 

Note: The workflow used to achieve the solution is attached which can be downloaded to see how the solution works.

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

 

ShankerV
17 - Castor

@RajatK 

 

Please rename the column name in Regex tool to get the desired column name.

 

ShankerV_0-1671195980223.png

 

ShankerV_1-1671196031409.png

 

ShankerV_2-1671196054281.png

 

Note: The workflow used to achieve the solution is attached which can be downloaded to see how the solution works.

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

ChrisTX
15 - Aurora

This is likely not the most elegant or efficient solution, but it seems to work. 

 

Brute force:

 

^(\d+)(\s)(([A-Za-z0-9\s\-\/])+)(\s)(([\(\,\d]+\.[\)\d]+)+)(\s)(([\(\,\d]+\.[\)\d]+)+)(\s)(([\(\,\d]+\.[\)\d]+)+)(\s)(([\(\,\d]+\.[\)\d]+)+)$

 

Other experts may be able to provide better RegEx.  The website regex101: build, test, and debug regex helps.

 

ChrisTX_0-1671199262305.png

 

 

Chris

Labels