On 7/31/07, Chas Owens <[EMAIL PROTECTED]> wrote: > On 7/31/07, Nevada <[EMAIL PROTECTED]> wrote: > snip > > but what is [\pL']? > snip > > Oops, I misread the question. It matches a unicode letter or a single quote. >
from perldoc perlre You can specify a character class, by enclosing a list of characters in "[]", which will match any one character from the list. If the first character after the "[" is "^", the class matches any character not in the list. Within a list, the "-" character specifies a range, so that "a-z" represents all characters between "a" and "z", inclusive. If you want either "-" or "]" itself to be a member of a class, put it at the start of the list (possibly after a "^"), or escape it with a back‐ slash. "-" is also taken literally when it is at the end of the list, just before the closing "]". (The following all specify the same class of three characters: "[-az]", "[az-]", and "[a\-z]". All are different from "[a-z]", which specifies a class containing twenty-six characters, even on EBCDIC based coded character sets.) Also, if you try to use the character classes "\w", "\W", "\s", "\S", "\d", or "\D" as end‐ points of a range, that's not a range, the "-" is understood literally. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/