I am trying to get a list of 10 digit numbers from a comment field. My challenge is that there could be 0-3 instances in the comment box and I need all of them.
I tried RegEx with the following but it only gave me the ones that had exactly three 9 digit numbers and skipped the others
.*(\d{9}).*(\d{9}).*(\d{9}).*
The first two columns are my input and the last 3 would be my desired output.
Account | Comment | Linked account #1 | Linked account #2 | Linked account #3 |
661648894 | No other accounts | |||
173190475 | linked to account 309448085 | 309448085 | ||
685015727 | Other Accounts include 787170533, 473792300, &132115945 | 787170533 | 467887389 | 132115945 |
312170997 | No other accounts | |||
467887389 | Other Accounts include 297712578-1 and 286230987-1 and 553231083-1 | 297712578 | 286230987 | 553231083 |
765610022 | Account at address 123 Main, Springfield, CO, 12345-6789 | |||
361338019 | 640092055770291080676829215 | 6400920557 | 702910806 | 76829215 |
924011524 | Linked to account 30345 23 345 | |||
848188639 | Two Additional Accounts are 963570212279321937. None else noted | 963570212 | 279321937 |
Is this something that can be done with a single tool or will I need to pull out the first instance and then run the remaining through to get the next instance and so on?
I appreciate any help I can get!
Steve
Solved! Go to Solution.
If you use Tokenize method with the Regex Tool, you might have some luck
Look at the image below.
Cheers,
I would use a tokenise to rows in conjunction with a crosstab to achieve the desired result and keep it fully dynamic (if the number of account numbers in the string ever changed)
If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.
Regards,
Jonathan
Much appreciated! This worked like a charm.
Awesome! Thank you for the extra step for future-proofing the workflow! As always I am amazed at the Alteryx Community!!