Why is this exception thrown when trying to match this regex in Java?
- by Scott Ferguson
I'm trying to match a specific string out of a an HTML document and have this regex pattern to grab it:
Pattern somePattern = Pattern.compile("var json = ({\"r\":\"^d1\".*});");
However when I try to hit that code at runtime, I get this error:
FATAL EXCEPTION: Timer-0
java.util.regex.PatternSyntaxException: Syntax error U_REGEX_RULE_SYNTAX…