java - PatternSyntaxException when using String.match() -
It appears that the innocuous pattern is creating a pattern syntax expression:
String pattern = "^ (?.: *) \\ * {$" s; // is pattern: ^ (?:. *) \ S * {$ As you can see when you are looking at it, it seems that working properly .
For example, that string should match:
name { The message I'm bringing back is " Index 9 has illegal repetition "but I do not know what I am doing, which is illegal, the culprit character should match any number of white space between the last section and <{p>
Is anyone wrong who I am?
prevent you from { to \\ is required.
Comments
Post a Comment