When splitting a string into an array using JavaScript, delimiters play a crucial role. If there are repeated delimiters, it indicates sub-values within the array. For example:
abc+!+;def+!+!+;123+!+;xyz
should be split into abc, [def, 123], xyz.
I've tried numerous variations and ended up with ((?:+!(?!+!))+\;|$), which may have been my initial attempt. After spending a lot of time on this, I seem to have hit a roadblock. I looked into resources like regex to parse string with escaped characters, but couldn't find a solution that fits my specific issue.
I'm sure someone out there is more knowledgeable in regular expressions than I am and I hope they can provide a solution.