diff options
author | brian d foy <brian.d.foy@gmail.com> | 2011-01-05 14:38:20 -0600 |
---|---|---|
committer | brian d foy <brian.d.foy@gmail.com> | 2011-01-05 14:38:20 -0600 |
commit | 4e4a173ce26fc4bc34edabb0517c7feb90536256 (patch) | |
tree | 310f260482333fce63567da2c0c66c6ac0a560e7 | |
parent | f64eb7e3f1535117ee91c13174660a9b6eef681b (diff) | |
download | perl-4e4a173ce26fc4bc34edabb0517c7feb90536256.tar.gz |
Move \N{3} warnings from perl5120delta into perlre
When \N was introduced, the perl*delta entry for it had a short
warning about its collision with \N{NAME} when the NAME was a
alias that was a digit. I've moved that into perlre at the spot
where there was a much less informative note about the same
problem.
-rw-r--r-- | pod/perlre.pod | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod index b74618f575..4262567f57 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -317,10 +317,23 @@ See L</Extended Patterns> below for details. =item [7] -Note that C<\N> has two meanings. When of the form C<\N{NAME}>, it matches the -character or character sequence whose name is C<NAME>; and similarly -when of the form C<\N{U+I<hex>}>, it matches the character whose Unicode -code point is I<hex>. Otherwise it matches any character but C<\n>. +Note that C<\N> has two meanings. When of the form C<\N{NAME}>, it +matches the character or character sequence whose name is C<NAME>; and +similarly when of the form C<\N{U+I<hex>}>, it matches the character +whose Unicode code point is I<hex>. Otherwise it matches any character +but C<\n>. C<\N{3}> means to match 3 non-newlines; C<\N{5,}> means to +match at least 5. C<\N{NAME}> still means the character or sequence +named C<NAME>, but C<NAME> cannot be things like C<3>, or C<5,>. This +will break a L<custom charnames translator|charnames/CUSTOM +TRANSLATORS> which allows numbers for character names, as C<\N{3}> in +a pattern always means to match 3 non-newline characters, and not the +character whose name is C<3>. + +Perl's developers are somewhat concerned about possible user confusion +with the existing C<\N{...}> construct which matches characters by +their Unicode name. Consequently, this feature is experimental. We may +remove it or change it in a backwards-incompatible way if it turns out +to be a problem. =back |