-
Sub-task
-
Resolution: Delivered
-
P4
-
9
-
Verified
In ```java.util.regex.Pattern``` using a character class of the form ```[^a-b[c-d]]```, the negation `^` negates the entire class, not just the first range.
The negation operator "^" has the lowest precedence among the character class operators, intersection "&&", union, range "-" and nested class "[ ]", so it is always applied last.
Previously, the negation was applied only to the first range or group leading to inconsistent and misunderstood matches.
Detail and examples in the issue and http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-June/006957.html.
The negation operator "^" has the lowest precedence among the character class operators, intersection "&&", union, range "-" and nested class "[ ]", so it is always applied last.
Previously, the negation was applied only to the first range or group leading to inconsistent and misunderstood matches.
Detail and examples in the issue and http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-June/006957.html.