Possible Duplicate:
Split string to equal length substrings in Java
I have a String[] data-structure, which is like this
0.1953601.3675211.3675214.1025640.5860811.36752110.3540903.711844-5.2747252.539683
I want to split this into an array like this
0.195360
1.367521
1.367521
4.102564
0.586081
1.367521
10.354090
3.711844
-5.274725
2.539683
so after the decimal the values have 6 significant figures
I tried using regex solution from this question but it doesnt seem to work.
even this
System.out.println(Arrays.toString(
"Thequickbrownfoxjumps".split("(?<=\\G.{4})")
));
gives me an output of [Theq, uickbrownfoxjumps]
not [Theq, uick, brow, nfox, jump, s]
how I would expect it to.