diff options
-rw-r--r-- | pod/perl5120delta.pod | 5 | ||||
-rw-r--r-- | pod/perlre.pod | 2 | ||||
-rw-r--r-- | pod/perlrebackslash.pod | 10 | ||||
-rw-r--r-- | pod/perlrecharclass.pod | 20 | ||||
-rw-r--r-- | pod/perlreref.pod | 6 |
5 files changed, 23 insertions, 20 deletions
diff --git a/pod/perl5120delta.pod b/pod/perl5120delta.pod index a5fac1430a..04d3b01372 100644 --- a/pod/perl5120delta.pod +++ b/pod/perl5120delta.pod @@ -233,7 +233,7 @@ more information. This pragma allows you to lexically disable or enable overloading for some or all operations. (Yuval Kogman) -=head2 C<\N> regex escape +=head2 C<\N> experimental regex escape A new regex escape has been added, C<\N>. It will match any character that is not a newline, independently from the presence or absence of the single @@ -250,6 +250,9 @@ which allows numbers for character names, as C<\N{3}> will now mean to match 3 non-newline characters, and not the character whose name is C<3>. (No standard name is a number, so only a custom translator would be affected.) +This escape is experimental, subject to change, because there is some concern +about possible confusion with the previous meaning of C<\N{...}> + =head2 Implicit strictures Using the C<use VERSION> syntax with a version number greater or equal diff --git a/pod/perlre.pod b/pod/perlre.pod index 37cb6fcf19..b3a6ef6b07 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -275,7 +275,7 @@ X<word> X<whitespace> X<character class> X<backreference> \g{name} Named backreference \k<name> Named backreference \K Keep the stuff left of the \K, don't include it in $& - \N Any character but \n + \N Any character but \n (experimental) \v Vertical whitespace \V Not vertical whitespace \h Horizontal whitespace diff --git a/pod/perlrebackslash.pod b/pod/perlrebackslash.pod index f3710e9e14..6b606845f7 100644 --- a/pod/perlrebackslash.pod +++ b/pod/perlrebackslash.pod @@ -85,7 +85,7 @@ as C<Not in [].> \l Lowercase next character. Not in []. \L Lowercase till \E. Not in []. \n (Logical) newline character. - \N Any character but newline. Not in []. + \N Any character but newline. Experimental. Not in []. \N{} Named or numbered (Unicode) character. \p{}, \pP Character with the given Unicode property. \P{}, \PP Character without the given Unicode property. @@ -517,10 +517,10 @@ Mnemonic: I<K>eep. =item \N -This is new in perl 5.12.0. It matches any character that is not a newline. -It is a short-hand for writing C<[^\n]>, and is identical to the C<.> -metasymbol, except under the C</s> flag, which changes the meaning of C<.>, but -not C<\N>. +This is a new experimental feature in perl 5.12.0. It matches any character +that is not a newline. It is a short-hand for writing C<[^\n]>, and is +identical to the C<.> metasymbol, except under the C</s> flag, which changes +the meaning of C<.>, but not C<\N>. Note that C<\N{...}> can mean a L<named or numbered character|/Named or numbered characters>. diff --git a/pod/perlrecharclass.pod b/pod/perlrecharclass.pod index ae44f84a82..140d8ea3a5 100644 --- a/pod/perlrecharclass.pod +++ b/pod/perlrecharclass.pod @@ -58,7 +58,7 @@ more detail below. \S Match a non-white space character. \h Match a horizontal white space character. \H Match a character that isn't horizontal white space. - \N Match a character that isn't newline. + \N Match a character that isn't newline. Experimental. \v Match a vertical white space character. \V Match a character that isn't vertical white space. \pP, \p{Prop} Match a character matching a Unicode property. @@ -113,15 +113,15 @@ C<\h> will match any character that is considered horizontal white space; this includes the space and the tab characters. C<\H> will match any character that is not considered horizontal white space. -C<\N>, like the dot, will match any character that is not a newline. The -difference is that C<\N> will not be influenced by the single line C</s> -regular expression modifier. (Note that, since C<\N{}> is also used for -named characters, if C<\N> is followed by an opening brace and something that -is not a quantifier, perl will assume that a character name is coming. For -example, C<\N{3}> means to match 3 non-newlines; C<\N{5,}> means to match 5 or -more non-newlines, but C<\N{4F}> is not a legal quantifier, and will cause -perl to look for a character named C<4F> (and won't find one unless custom names -have been defined that include it.) +C<\N> is an experimental feature. It, like the dot, will match any character +that is not a newline. The difference is that C<\N> will not be influenced by +the single line C</s> regular expression modifier. (Note that, since C<\N{}> is +also used for named characters, if C<\N> is followed by an opening brace and +something that is not a quantifier, perl will assume that a character name is +coming. For example, C<\N{3}> means to match 3 non-newlines; C<\N{5,}> means +to match 5 or more non-newlines, but C<\N{4F}> is not a legal quantifier, and +will cause perl to look for a character named C<4F> (and won't find one unless +custom names have been defined that include it.) C<\v> will match any character that is considered vertical white space; this includes the carriage return and line feed characters (newline). diff --git a/pod/perlreref.pod b/pod/perlreref.pod index a776e5fb36..c6cbe752fe 100644 --- a/pod/perlreref.pod +++ b/pod/perlreref.pod @@ -126,9 +126,9 @@ and L<perlunicode> for details. \S A non-whitespace character \h An horizontal white space \H A non horizontal white space - \N A non newline (when not followed by '{NAME}'; not valid in a - character class; equivalent to [^\n]; it's like . without /s - modifier) + \N A non newline (when not followed by '{NAME}'; experimental; not + valid in a character class; equivalent to [^\n]; it's like '.' + without /s modifier) \v A vertical white space \V A non vertical white space \R A generic newline (?>\v|\x0D\x0A) |