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!
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
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