-2

How can i split the following string based upon double spaces, single spaces, ^, : and |

0 0 0 0 0 : 0 0 0 0 0 | 0 0 0 0 0 : 0 0 0 0 0 | 0 0 ^ 0 0 0 : 0 0 0 0 0 | 0 0 0 0 0 : 0 0 6 4 5 | 1 1 8 7 1 : 9 1 6 5 16 | 0 0 0 0 0 : 1 4 25 0

Andreas
  • 154,647
  • 11
  • 152
  • 247

1 Answers1

0

You can try splitting the string like below

String abc = "0  0  : 25 ^  2 : 1 | 0";
String[] stringarr = abc.split("[ ]+|\\:+|\\^+|\\|");