# HG changeset patch # User sherman # Date 1304275172 25200 # Node ID 3d4bcfaa8627d59d399019ad93b8cdcbfe00cdf2 # Parent 6f715a596a2e11a73613b348b493700a26d453e8 7036522: j.u.r.Pattern documentation errors Summary: updated the Perl related information Reviewed-by: alanb diff -r 6f715a596a2e -r 3d4bcfaa8627 jdk/src/share/classes/java/util/regex/Pattern.java --- a/jdk/src/share/classes/java/util/regex/Pattern.java Sun May 01 14:22:32 2011 +0800 +++ b/jdk/src/share/classes/java/util/regex/Pattern.java Sun May 01 11:39:32 2011 -0700 @@ -667,8 +667,30 @@ *
Perl constructs not supported by this class:
* *Predefined character classes (Unicode character) + *
\h A horizontal whitespace + *
\H A non horizontal whitespace + *
\v A vertical whitespace + *
\V A non vertical whitespace + *
\R Any Unicode linebreak sequence + * \u005cu000D\u005cu000A|[\u005cu000A\u005cu000B\u005cu000C\u005cu000D\u005cu0085\u005cu2028\u005cu2029] + *
\X Match Unicode + * + * extended grapheme cluster + *
The conditional constructs (?{X}) and + *
The backreference constructs, \g{n} for + * the nthcapturing group and + * \g{name} for + * named-capturing group. + *
The named character construct, \N{name} + * for a Unicode character by its name. + *
The conditional constructs + * (?(condition)X) and * (?(condition)X|Y), *
Possessive quantifiers, which greedily match as much as they can - * and do not back off, even when doing so would allow the overall match to - * succeed.
Character-class union and intersection as described * above.
Perl is forgiving about malformed matching constructs, as in the - * expression *a, as well as dangling brackets, as in the - * expression abc], and treats them as literals. This - * class also accepts dangling brackets but is strict about dangling - * metacharacters like +, ? and *, and will throw a - * {@link PatternSyntaxException} if it encounters them.