正则表达式验证错误,求高手指教
public static final String ABC_PC = "(((-?0\\.[0-9]{1,3})|(-?[1-9][0-9]?\\.[0-9]{1,3})|(-?[1-9][0-9]?|(0)|(-?100)|(-?100\\.0{1,3}))),)+";
String str="1.001,0.000,100,-100,0.001,1.0,.........."; 长度最多不会超过400
str.matches(ABC_PC);
org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet springmvc threw exception
java.lang.StackOverflowError
at java.lang.Character.codePointAt(Character.java:2335)
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3344)
at java.util.regex.Pattern$Curly.match(Pattern.java:3737)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Ques.match(Pattern.java:3691)
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
at java.util.regex.Pattern$Ques.match(Pattern.java:3691)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern..
------解决方案--------------------正则匹配的时候
内存溢出。 正则匹配有问题。