summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perlre.pod1
-rw-r--r--pod/perlrebackslash.pod1
-rw-r--r--pod/perlrecharclass.pod10
-rw-r--r--pod/perlreref.pod1
-rw-r--r--pod/perltodo.pod6
5 files changed, 11 insertions, 8 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod
index a076d3ad66..ee1c2cb940 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -271,6 +271,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
\v Vertical whitespace
\V Not vertical whitespace
\h Horizontal whitespace
diff --git a/pod/perlrebackslash.pod b/pod/perlrebackslash.pod
index ddd7abee38..40f73fcbc1 100644
--- a/pod/perlrebackslash.pod
+++ b/pod/perlrebackslash.pod
@@ -83,6 +83,7 @@ quoted constructs>.
\l Lowercase next character.
\L Lowercase till \E.
\n (Logical) newline character.
+ \N Any character but newline.
\N{} Named (Unicode) character.
\p{}, \pP Character with a Unicode property.
\P{}, \PP Character without a Unicode property.
diff --git a/pod/perlrecharclass.pod b/pod/perlrecharclass.pod
index a626dd9bb9..930c0fc4e4 100644
--- a/pod/perlrecharclass.pod
+++ b/pod/perlrecharclass.pod
@@ -38,7 +38,6 @@ Here are some examples:
"\n" =~ /(?s:.)/ # Match (local 'single line' modifier)
"ab" =~ /^.$/ # No match (dot matches one character)
-
=head2 Backslashed sequences
Perl regular expressions contain many backslashed sequences that
@@ -59,6 +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.
\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.
@@ -94,7 +94,7 @@ Any character that isn't matched by C<\w> will be matched by C<\W>.
=head3 White space
-C<\s> matches any single character that is consider white space. In the
+C<\s> matches any single character that is considered white space. In the
ASCII range, C<\s> matches the horizontal tab (C<\t>), the new line
(C<\n>), the form feed (C<\f>), the carriage return (C<\r>), and the
space (the vertical tab, C<\cK> is not matched by C<\s>). The exact set
@@ -113,6 +113,12 @@ 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
+Unicode named characters, if C<\N> is followed by an opening brace and
+by a letter, perl will assume that a Unicode character name is coming.)
+
C<\v> will match any character that is considered vertical white space;
this includes the carriage return and line feed characters (newline).
C<\V> will match any character that is not considered vertical white space.
diff --git a/pod/perlreref.pod b/pod/perlreref.pod
index b9fb3b0202..87baab25e8 100644
--- a/pod/perlreref.pod
+++ b/pod/perlreref.pod
@@ -125,6 +125,7 @@ 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 (like . without /s)
\v A vertical white space
\V A non vertical white space
\R A generic newline (?>\v|\x0D\x0A)
diff --git a/pod/perltodo.pod b/pod/perltodo.pod
index cf0304aae9..c84b51e368 100644
--- a/pod/perltodo.pod
+++ b/pod/perltodo.pod
@@ -1101,12 +1101,6 @@ combines the code in pp_entersub, pp_leavesub. This should probably
be done 1st in XS, and using B::Generate to patch the new OP into the
optrees.
-=head2 C<\N>
-
-It should be possible to add a C<\N> regex assertion, meaning "every
-character except C<\n>° independently of the context. That would
-of course imply that C<\N> couldn't be followed by an opening C<{>.
-
=head1 Big projects
Tasks that will get your name mentioned in the description of the "Highlights