Fix regex charclass parsing so that bogus ranges
[p5sagit/p5-mst-13.2.git] / pod / perlre.pod
index 85b2a94..a1a118f 100644 (file)
@@ -217,7 +217,7 @@ character class.  For example:
 matches one, zero, any alphabetic character, and the percentage sign.
 
 The exact meanings of the above classes depend from many things:
-if the C<utf8> pragma is used, the following equivalenced to Unicode
+if the C<utf8> pragma is used, the following equivalences to Unicode
 \p{} constructs hold:
 
     alpha       IsAlpha
@@ -238,7 +238,7 @@ For example, [:lower:] and \p{IsLower} are equivalent.
 
 If the C<utf8> pragma is not used but the C<locale> pragma is, the
 classes correlate with the isalpha(3) interface (except for `word',
-which is a Perl extension).
+which is a Perl extension, mirroring \w).
 
 The assumedly non-obviously named classes are:
 
@@ -249,6 +249,8 @@ The assumedly non-obviously named classes are:
         Any control character.  Usually characters that don't produce
         output as such but instead control the terminal somehow:
         for example newline and backspace are control characters.
+       All characters with ord() less than 32 are most often control
+       classified as characters.
 
 =item graph
 
@@ -275,9 +277,11 @@ The assumedly non-obviously named classes are:
 You can negate the [::] character classes by prefixing the class name
 with a '^'. This is a Perl extension.  For example:
 
-    ^digit      \D      \P{IsDigit}
-    ^space     \S      \P{IsSpace}
-    ^word      \W      \P{IsWord}
+    POSIX      trad. Perl  utf8 Perl
+
+    [:^digit:]      \D      \P{IsDigit}
+    [:^space:]     \S      \P{IsSpace}
+    [:^word:]      \W      \P{IsWord}
 
 The POSIX character classes [.cc.] and [=cc=] are B<not> supported
 and trying to use them will cause an error.