K
kramer31
Hi.
I have an array of strings that I'm trying to use in regexs. the
following line is generating Several errors:
BrowserIdentification.java:17: illegal escape character
protected static String[] acceptedUserAgentPatterns = {"MSIE\s?(\d)+
\.", "Firefox/(\d)\."};
It looks like it is complaining about the \d (which I read about in
the java regex documentation) as well as the \. (which I have to
escape so that it only matches a literal '.', right?
BTW, I am using the ( ) so that I can use matcher.group, later. I'm
compiling using 1.4.2 specifically jrockit-R27.1.0-jdk1.4.2_12
Am I just missing something really obvious here?
I have an array of strings that I'm trying to use in regexs. the
following line is generating Several errors:
BrowserIdentification.java:17: illegal escape character
protected static String[] acceptedUserAgentPatterns = {"MSIE\s?(\d)+
\.", "Firefox/(\d)\."};
It looks like it is complaining about the \d (which I read about in
the java regex documentation) as well as the \. (which I have to
escape so that it only matches a literal '.', right?
BTW, I am using the ( ) so that I can use matcher.group, later. I'm
compiling using 1.4.2 specifically jrockit-R27.1.0-jdk1.4.2_12
Am I just missing something really obvious here?