- I have a string that can vary in size containing multiple substrings
- These substrings are delimited by a colon.
- I need to capture these substrings into groups, but I cannot use any supporting language to do this. It has to be regex only and work in this tester https://regexr.com/. The reason for this limitation is that I am cutting strings via a UI that doesn't support additional code (Adobe Analytics). This means I cannot use functions such as 'split()' or 'explode()'.
- I would like a single expression as an answer.
Example1: test1:test2:test3:test4
would be broken into 4 groups.
test1
test2
test3
test4
Example2: 123:abc
would be broken into just 2 groups.
123
abc
Is this possible? Thanks, Chris