-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
None
-
rc1
-
sparc
-
solaris_7
Customer writes:
The javadoc for java.util.regex.Pattern indicates that character class
subtraction is done by a combination of intersection and negation:
[a-z&&[^aeiou]]
Then later in the same table, it indicates that named character classes
can be subtracted with a hypen. The example give is:
[\p{L}-[\p{Lu}]] Any letter except an uppercase letter
(subtraction)
I suspect this is a syntax error, and my experiments with the
implementation confirm it. I think the example should be written using
&& and ^ instead of -.
The javadoc for Pattern says this:
(?idmsux-idmsux:X) X, as a capturing group with the given flags on -
off
But the Perl documentation says this:
(?imsx-imsx:pattern)
This is for clustering, not capturing; it groups
subexpressions like "()", but doesn't make
backreferences as "()" does. So
I suspect there is a typo in the javadoc, and it should say
non-capturing instead of capturing.
The javadoc for java.util.regex.Pattern indicates that character class
subtraction is done by a combination of intersection and negation:
[a-z&&[^aeiou]]
Then later in the same table, it indicates that named character classes
can be subtracted with a hypen. The example give is:
[\p{L}-[\p{Lu}]] Any letter except an uppercase letter
(subtraction)
I suspect this is a syntax error, and my experiments with the
implementation confirm it. I think the example should be written using
&& and ^ instead of -.
The javadoc for Pattern says this:
(?idmsux-idmsux:X) X, as a capturing group with the given flags on -
off
But the Perl documentation says this:
(?imsx-imsx:pattern)
This is for clustering, not capturing; it groups
subexpressions like "()", but doesn't make
backreferences as "()" does. So
I suspect there is a typo in the javadoc, and it should say
non-capturing instead of capturing.