Welcome to the Monastery | |
PerlMonks |
Re^3: check if string contains anything other than alphanumericby FunkyMonk (Chancellor) |
on Aug 12, 2007 at 09:05 UTC ( [id://632037]=note: print w/replies, xml ) | Need Help?? |
If a character class starts with ^, it is a negated character class. That is, it will match any character that is not in the class. So, /[^a-zA-Z0-9]/ will match any character that is not a letter or digit. See perlretut for a tutorial on regexps and perlre for the details.
update: My 200th node :)
In Section
Seekers of Perl Wisdom
|
|