The following seemingly innocuous pattern is causing a PatternSyntaxException:
String pattern = "^(?:.*)\\s*{$"; // pattern is: ^(?:.*)\s*{$
As you can see when you look at it in regexpal, it seems to work properly there.
For example, that string should match:
name {
The message I'm getting back is "Illegal repetition near index 9", but I have no idea what I'm doing that's illegal. The offending character is supposed to match any number of whitespace characters between the final section and the {.
Can anyone spot what I'm doing wrong?