Exception in thread "main" java.util.regex.PatternSyntaxException: Unclosed character class near index 0 解决方法: 要对切割字符进行转义\\

使用str.split("[",15)时,出现Exception in thread "main" java.util.regex.PatternSyntaxException: Unclosed character class near index 0 [ ^的问题

解决办法为在[加上\\转义

str.split("\\[",15)   

上一篇:基于Web的Kafka管理器工具之Kafka-manager启动时出现Exception in thread "main" java.lang.UnsupportedClassVersionError错误解决办法(图文详解)


下一篇:Exception in thread "main" java.nio.channels.NotYetConnectedException