I'm stuck with a javax regex.
I have this kind of string :
" [[[10,10],[20,20],[30,30]], [[11,11],[21,21],[31,31]]] "
The goal is to split this string into different levels of arrays. If I'm not clear this is what I should get after the treatment.
-
Split the string into the first level:
" [[[10,10],[20,20],[30,30]], [[11,11],[21,21],[31,31]]] "
Give
" [[10,10],[20,20],[30,30]], [[11,11],[21,21],[31,31]] "
-
Split each result of 1. into the second level:
" [[10,10],[20,20],[30,30]], [[11,11],[21,21],[31,31]] "
Give
" [[10,10],[20,20],[30,30]] " and " [[11,11],[21,21],[31,31]] "
-
Split each result of 2. into the third level
" [[10,10],[20,20],[30,30]] "
Give
" [10,10] " and " [20,20] " and " [30,30] "
And
" [[11,11],[21,21],[31,31]] "
Give
" [11,11] " and " [21,21] " and " [31,31] "
So if you have the good regex pattern to do that, it will be nice.
Thanks in advance, PKB
Aucun commentaire:
Enregistrer un commentaire