The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

FIXED WIDTH TEXT TO COLUMNS

andrebrandaobritob
6 - Meteoroid

Hello, can someone help me break this line of data according to this amount of digits?

 

Line of data to be broken into columns:

 

SWAP 1001424B0161785201837120370900000000011032510600000000010551058120240514 000056830300

 

DIGITS: 5, 1, 4, 11, 2, 10, 10, 8, 10, 8, 8, 8, 14, 2, 2

 

 

I've tried using regex but it keeps skipping the "SWAP " data at the beginning and as a result, all other data is arranged incorrectly.

 

the regex formula I'm using: 

(\d{5})(\d{1})(\d{4})(\d{11})(\d{2})(\d{10})(\d{10})(\d{8})(\d{10})(\d{8})(\d{8})(\d{8})(\d{14})(\d{2})(\d{2})

 

 

Thanks!

2 REPLIES 2
alexnajm
19 - Altair
19 - Altair

I think because you have letters, you will need to switch all of the \d with \w to be safe 😊 I also haven't checked your pattern/amount of characters but double check those

 

You also might want to start your statement with SWAP\s

alexnajm
19 - Altair
19 - Altair

Also I just counted - you have 90 characters in your sample but 103 characters specified in your pattern. It'll be difficult to ascertain which part f the value is the 5 digits or the 1 digit or the 4 digits without knowing where those extra characters would be

Labels
Top Solution Authors