We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

RegEx converting one column with text and date

mikael_hyensjo
Alteryx
Alteryx

I have the below text in one column.

Adobe,7/24/20209432*0.7*99[7]

Microsoft,7/11/20209988*0.1*99[7]

 

Would like to have:

 

Adobe, 2009-07-24, 432, 0.7, 99, 7

5 REPLIES 5
ShankerV
17 - Castor

Hi @mikael_hyensjo 

 

To derive the solution, please use Regex.

Then use the date time tool to convert the date to the desired format.

 

Then using formula tool, combine with , separator.

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @mikael_hyensjo 

 

Please find the expected result.

 

ShankerV_0-1673254492038.png

 

If this helps, please like this post and mark it as a solution. If you have any other questions, please let us know.

 

Many thanks

Shanker V

 

ShankerV
17 - Castor

Hi @mikael_hyensjo 

 

Step 1: Input

ShankerV_0-1673255332382.png

 

 

step 2: Regex

 

(.+\,)(.{9})(.+)

ShankerV_1-1673255352316.png

ShankerV_2-1673255361388.png

 

Step 3: Formula

 

ShankerV_4-1673255411172.png

 

ShankerV_3-1673255394484.png

 

If this helps, please like this post and mark it as a solution. If you have any other questions, please let us know.

 

Many thanks

Shanker V

 

ShankerV
17 - Castor

Hi @mikael_hyensjo 

 

Step 4: 

ShankerV_0-1673255471956.png

 

ShankerV_1-1673255482310.png

 

Step 5:

 

ShankerV_3-1673255509394.png

ShankerV_4-1673255519055.png

 

 

Step 6:

[RegExOut1]+[Date]+","+[RegExOut31]+","+[RegExOut32]+","++[RegExOut33]+","+Left([RegExOut34],1)

ShankerV_5-1673255538407.png

 

[RegExOut1]+[Date]+","+[RegExOut31]+","+[RegExOut32]+","++[RegExOut33]+","+Left([RegExOut34],1)

 

ShankerV_6-1673255547819.png

 

Step 7: select tool

ShankerV_7-1673255589684.png

 

ShankerV_8-1673255600781.png

 

If this helps, please like this post and mark it as a solution. If you have any other questions, please let us know.

 

Many thanks

Shanker V

grazitti_sapna
17 - Castor

@mikael_hyensjo , If you are looking for the below output then you can use this workflow. Not sure if this was what you needed. Do let me know if it was helpful You can use it to add single delimiter in your data instead of numerous as you have in your input.

 

grazitti_sapna_0-1673255758879.png

 

Sapna Gupta
Labels
Top Solution Authors