X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlre.pod;h=37434a67e75b57034aca6e476ad6f5489c1a0b76;hb=84850974f570c6c594cc0df54611ffc5f0b26130;hp=2b24379c8bce8f0621dad035b9dc82d19e2994de;hpb=7dd178533182fc85a734d7633d0a938b5d1c853a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlre.pod b/pod/perlre.pod index 2b24379..37434a6 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -515,7 +515,11 @@ in C<[]>, which will match any one of the characters in the list. If the first character after the "[" is "^", the class matches any character not in the list. Within a list, the "-" character is used to specify a range, so that C represents all the characters between "a" and "z", -inclusive. +inclusive. If you want "-" itself to be a member of a class, put it +at the start or end of the list, or escape it with a backslash. (The +following all specify the same class of three characters: C<[-az]>, +C<[az-]>, and C<[a\-z]>. All are different from C<[a-z]>, which +specifies a class containing twenty-six characters.) Characters may be specified using a metacharacter syntax much like that used in C: "\n" matches a newline, "\t" a tab, "\r" a carriage return,