On Jan 7, McCollum, Frank said:

>so, if a character is inside of square brackets [], then perl recognizes
>that it is part of a character class and never uses it as a quantifier or
>special character??

Very few characters need escaping a char class.  ] does (unless it's the
first character of the class), ^ does (ONLY when it's the first character
of the class and you don't want it to mean "take the opposite of this char
class"), and - does (ONLY when it is between two characters that would
otherwise cause it to form a range).  Then of course $ and @ need it, but
that's so that you're not making a variable by mistake.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to