java.util.regex.PatternSyntaxException 错误问题

,+、*、|、\等符号在正则表达示中有相应的不同意义。
一般来讲只需要加[]、或是\\即可
改成"sdfasdf+asdfasdf".split("[+]")

你可能感兴趣的:(Java总结)