Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Parse input data into equal length

Alt_dp
7 - Meteor

Team,

 

I have a text input that i want to parse through using length as a condition. In the attached example, i want to split the field if the text size is 9. Is my regular expression wrong? Can you guys help?

4 REPLIES 4
Bob_Blackey
11 - Bolide

Hi,

 

Can you give an example of an input record and the desired output?

 

In this case do you want to separate the field into nine digit chunks? In that case I would use the Tokenize option instead and use the Split to Rows option in the Regex tool. You can keep the Regular Expression the same.

 

Cheers,

Bob

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Alt_dp,

 

I've created a sample workflow that will divide into 9byte fields.

 

Cheers,
Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Federica_FF
11 - Bolide

Hi @Alt_dp,

 

if you use the parse method, you have to put the part you want to extract/parse between parenthesis (\d{9}).

 

But this way you only get the first 9 characters of your strings. You maybe/probably want to split your long string into N smaller strings made of 9 digits?

 

In this case you could try the tokenize method, tokenize to rows or to columns. See attached file!

Alt_dp
7 - Meteor

You read my mind. Thanks for the solution and quick turn around

Labels