I have a string like
abc123/xyz456/abc/123/aaa/zzz
I would like to split it as
abc123, xyz456 and abc/123/aaa/zzz
Basically, I want to split and get the first 2 items as separate items and the rest of the items can be combined.
I tried the regex ^(.*)\/(.*)\/(.*)$
but it gives me the other way around like zzz
, aaa
and abc123/xyz456/abc/123
.
Is there a way to get this parsed from left to right instead of right to left? or any suggestions would be helpful