In my Javascript code, I have a string that is something like this:
"1943[15]43[67]12[32]"
I want to return an array like this:
["1","9","4","3","15","4","3","67","1", 2","32"]
That is, I want it to separate every character, except the numbers inside the brackets, which I want to preserve as one element.
Is there an elegant way to do this?
jsFiddle.