This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add details of module updates
[perl5.git] / pod / perlrecharclass.pod
index c86a2c3..930c0fc 100644 (file)
@@ -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.
@@ -387,16 +393,16 @@ Perl recognizes the following POSIX character classes:
  alpha  Any alphabetical character.
  alnum  Any alphanumerical character.
  ascii  Any ASCII character.
- blank  A GNU extension, equal to a space or a horizontal tab (C<\t>).
+ blank  A GNU extension, equal to a space or a horizontal tab ("\t").
  cntrl  Any control character.
- digit  Any digit, equivalent to C<\d>.
+ digit  Any digit, equivalent to "\d".
  graph  Any printable character, excluding a space.
  lower  Any lowercase character.
  print  Any printable character, including a space.
  punct  Any punctuation character.
- space  Any white space character. C<\s> plus the vertical tab (C<\cK>).
+ space  Any white space character. "\s" plus the vertical tab ("\cK").
  upper  Any uppercase character.
- word   Any "word" character, equivalent to C<\w>.
+ word   Any "word" character, equivalent to "\w".
  xdigit Any hexadecimal digit, '0' - '9', 'a' - 'f', 'A' - 'F'.
 
 The exact set of characters matched depends on whether the source string