Exception in thread “main” java.util.regex.PatternSyntaxException: Unclosed character class near index 0 [ ^
字符转义问题添加“\”
String s2 = locate.replaceAll("\\[", ""); // 把 [ 删除
String s3 = s2.replaceAll("\\]]", ""); // 把 ]] 替换 “ , ”
Exception in thread “main” java.util.regex.PatternSyntaxException: Unclosed character class near index 0 [ ^
字符转义问题添加“\”
String s2 = locate.replaceAll("\\[", ""); // 把 [ 删除
String s3 = s2.replaceAll("\\]]", ""); // 把 ]] 替换 “ , ”