I have a string:
str = "99,{b:["a1":"0","s1":"0"],c:[{"a2":"0","s2":"0"}]},-98,97,[11,22,33],96,-95,{"b2":"3"}"
I want to split it as below:
v1= 99
v2 = {b:["a1": "0", "s1": "0"],c:[{"a2": "0", "s2": "0"}]}
v3 = -98
v4 = 97
v5 = [11,22,33]
v6 = 96
v7 = -95
v8 = {"b2":"3"}
I have this regex to get the contents of v2
:
str[/\{.*?\}]}/]
but I cannot get the other content details.