I was trying to split a sting and add it to an string array.
String str1 = "1, two, {three,4,5,{six,7}}, 8, nine,{[ten,{\"11\":\"12\"},{\"thirteen\":14}]},\"fifteen\",16";
Required output in an array is:
1
two
{three,4,5,{six,7}}
8
nine
{[ten,{"11":"12"},{"thirteen":14}]}
fifteen
16
We would need to split this with a split function in java using a regex. Can anyone suggest the regex to fetch this output?