I want to split a Java string:
"[1,2,3,4,5]"
So I have an array that only has the integers
1
2
3
4
5
Without the ", [ ]"
I tried
String[] test = x.split("(, )|(\\[\\)|(\\]\\)");
Which I found in another thread but it does not work properly.
It keeps an empty string in test[0].