Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex - tokenize to separate at specific comma intervals

VXM516
5 - Atom

HI everyone, I have a unique sort of expression I am trying to write but can't figure it out!

 

in my data set I have a list of values (last column) that are separated by a comma. I was to split the data so that the final result is that there are a max of 8 values in each column or until all [groups of 8] have been split.

 

Bonus points if I can get it in the format of the 3rd print screen.

 

 

 

VXM516_1-1628185014127.png

 

VXM516_6-1628185320859.png

 

VXM516_7-1628185359391.png

 

 

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @VXM516 

 

Can you provide sample data.

 

Regex like below in regex parse mode should work.

 

^([\w\-]*,?[\w\-]*,?[\w\-]*,?[\w\-]*,?[\w\-]*,?[\w\-]*,?[\w\-]*,?[\w\-]*)

VXM516
5 - Atom

Thank you for the prompt response @atcodedog05, the formula didn't work for me. Have attached the Sample file

 

 

phottovy
13 - Pulsar
13 - Pulsar

Hi @VXM516 ,

 

I found the attached approach easier than trying to use RegEx. Hopefully it helps.

 

Edited:

I added a reporting Table tool to get the results to look like this:

phottovy_0-1628195135561.png

 

VXM516
5 - Atom

this method worked perfectly - thank you @phottovy!

Labels
Top Solution Authors