X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlre.pod;h=380bc5f1f38231b10aaf3489b25cecfa255f3c34;hb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;hp=c964be8b8f2899ab34080988e34029b4df6d753a;hpb=4b19af017623bfa3bb72bb164598a517f586e0d3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlre.pod b/pod/perlre.pod index c964be8..380bc5f 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -199,20 +199,26 @@ equivalents (if available) are as follows: alpha alnum ascii + blank [1] cntrl digit \d graph lower print punct - space \s + space \s [2] upper - word \w + word \w [3] xdigit + [1] A GNU extension equivalent to C<[ \t]>, `all horizontal whitespace'. + [2] Not I to C<\s> since the C<[[:space:]]> includes + also the (very rare) `vertical tabulator', "\ck", chr(11). + [3] A Perl extension. + For example use C<[:upper:]> to match all the uppercase characters. -Note that the C<[]> are part of the C<[::]> construct, not part of the whole -character class. For example: +Note that the C<[]> are part of the C<[::]> construct, not part of the +whole character class. For example: [01[:alpha:]%] @@ -224,6 +230,7 @@ If the C pragma is used, the following equivalences to Unicode alpha IsAlpha alnum IsAlnum ascii IsASCII + blank IsSpace cntrl IsCntrl digit IsDigit graph IsGraph @@ -238,8 +245,8 @@ If the C pragma is used, the following equivalences to Unicode For example C<[:lower:]> and C<\p{IsLower}> are equivalent. If the C pragma is not used but the C pragma is, the -classes correlate with the isalpha(3) interface (except for `word', -which is a Perl extension, mirroring C<\w>). +classes correlate with the usual isalpha(3) interface (except for +`word' and `blank'). The assumedly non-obviously named classes are: @@ -353,7 +360,7 @@ everything before the matched string. And C<$'> returns everything after the matched string. The numbered variables ($1, $2, $3, etc.) and the related punctuation -set (C<<$+>, C<$&>, C<$`>, and C<$'>) are all dynamically scoped +set (C<$+>, C<$&>, C<$`>, and C<$'>) are all dynamically scoped until the end of the enclosing block or until the next successful match, whichever comes first. (See L.)