From: Karl Williamson Date: Sun, 28 Mar 2010 04:50:46 +0000 (-0600) Subject: Fix typos, minor wording changes, clarifications X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=58151fe4e3ed9d2e8ad9699d19d2b7d712cb1842;p=p5sagit%2Fp5-mst-13.2.git Fix typos, minor wording changes, clarifications --- diff --git a/pod/perlrebackslash.pod b/pod/perlrebackslash.pod index 6b60684..48ec0e7 100644 --- a/pod/perlrebackslash.pod +++ b/pod/perlrebackslash.pod @@ -111,8 +111,8 @@ as C =head3 Fixed characters A handful of characters have a dedicated I. The following -table shows them, along with their code points (in decimal and hex), their -ASCII name, the control escape (see below) and a short description. +table shows them, along with their ASCII code points (in decimal and hex), +their ASCII name, the control escape (see below) and a short description. Seq. Code Point ASCII Cntr Description. Dec Hex @@ -210,7 +210,7 @@ Note that a character that is expressed as an octal escape is considered as a character without special meaning by the regex engine, and will match "as is". -=head4 Examples +=head4 Examples (assuming an ASCII platform) $str = "Perl"; $str =~ /\120/; # Match, "\120" is "P". @@ -253,7 +253,7 @@ matched as is. =head3 Hexadecimal escapes -Hexadecimal escapes start with C<\x> and are then either followed by +Hexadecimal escapes start with C<\x> and are then either followed by a two digit hexadecimal number, or a hexadecimal number of arbitrary length surrounded by curly braces. The hexadecimal number is the code point of the character you want to express. @@ -316,15 +316,15 @@ the character classes are written as a backslash sequence. We will briefly discuss those here; full details of character classes can be found in L. -C<\w> is a character class that matches any I character (letters, -digits, underscore). C<\d> is a character class that matches any digit, +C<\w> is a character class that matches any single I character (letters, +digits, underscore). C<\d> is a character class that matches any decimal digit, while the character class C<\s> matches any white space character. New in perl 5.10.0 are the classes C<\h> and C<\v> which match horizontal and vertical white space characters. The uppercase variants (C<\W>, C<\D>, C<\S>, C<\H>, and C<\V>) are character classes that match any character that isn't a word character, -digit, white space, horizontal white space or vertical white space. +digit, white space, horizontal white space nor vertical white space. Mnemonics: Iord, Iigit, Ipace, Iorizontal, Iertical. @@ -533,10 +533,10 @@ C<\R> matches a I, that is, anything that is considered a newline by Unicode. This includes all characters matched by C<\v> (vertical white space), and the multi character sequence C<"\x0D\x0A"> (carriage return followed by a line feed, aka the network newline, or -the newline used in Windows text files). C<\R> is equivalent with -C<< (?>\x0D\x0A)|\v) >>. Since C<\R> can match a more than one character, -it cannot be put inside a bracketed character class; C is an error. -C<\R> was introduced in perl 5.10.0. +the newline used in Windows text files). C<\R> is equivalent to +C<< (?>\x0D\x0A)|\v) >>. Since C<\R> can match a sequence of more than one +character, it cannot be put inside a bracketed character class; C is an +error; use C<\v> instead. C<\R> was introduced in perl 5.10.0. Mnemonic: none really. C<\R> was picked because PCRE already uses C<\R>, and more importantly because Unicode recommends such a regular expression