Java splits a line ignoring any delimiters between brackets
I am looking for java regex to split inputString while ignoring delimiters between brackets / multiple brackets.
Java code:
Pattern p = Pattern.compile("[,regex?]");
String[] desiredOutput =p.split(inputString);
eg:
inputString="1,{2,{3},4},{4,5},6";
requiredOutput with; Separator:
1;{2,{3},4};{4,5};6
Thnx!
+1
source to share