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.
SOLVED

Losing characters when using regex tool to tokenize field to 999 characters

Sunceray
7 - Meteor

Hello,

Ultimate solution attempting to achieve is to have a "||" delimiter inserted in a comment field between each block of 999 characters, if the string is >999 characters. What I have tried so far is splitting the field into rows using a Regex tool formula "^(.{0,999})\b\W?" tokenizing it into rows. This is resulting in variable truncating of characters anywhere from 2 to 2426 characters. I then use the Summary tool to concatenate the rows of the field together with a "||" at the end the but of course the results are incorrect due to concatenation by the Regex formula.

 

 

6 REPLIES 6
caltang
17 - Castor
17 - Castor

Can you give some data to showcase?

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Sunceray
7 - Meteor

@caltang thank you for responding. Yes, I will build a sample dataset

Sunceray
7 - Meteor

Split to rows.png

I attached the sample I worked up, and for some reason the same regex is now only truncating if >999 and not splitting to rows (see screenshot)

caltang
17 - Castor
17 - Castor

It's getting late here for me but I did something fast for you and you can tweak it accordingly.

 

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Sunceray
7 - Meteor

@caltang thank you very much Calvin! I appreciate your help and will work this now =)

Sunceray
7 - Meteor

@caltang this worked perfectly! Thank you Calvin!

Labels
Top Solution Authors