I'm trying to split a string , but I get 'java.util.regex.PatternSyntaxException' exception because its seeing "][" as Unclosed character class. Anybody knows the escape character for this?
String pattern = "]".concat"["
String toSplit = "|][%";
List<String> splitted = Arrays.asList(toSplit.split(pattern))
I also tried pattern with value "\]\[" but still doens't work. Any suggestions?
reaction for more information.