-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
None
-
beta
-
x86
-
windows_nt
-
Verified
I was trying to create a range that was all characters except a specific
character that I described by an octal escape sequence. However the
escape sequence was rejected with the error below.
Exception in thread "main" java.util.regex.PatternSyntaxException: unexpected
error in character range around index 30
\smethod=POST\s+action=([^\076]*)
^
This appears to be one symptom of a more general bug that escape characters
aren't accepted within ranges. See the simple test case below.
Given that many interesting characters may need to be escaped to be used in
regular expressions, this looks like it could be a limitation.
public class Test {
public static void main(String argv[]) throws Exception {
java.util.regex.Pattern.compile("[\\t]");
}
}
graham.hamilton@Eng 2001-02-22