To create a complementary character class, use [^...], see perlre. In order to strip characters, tr/// is the better (=more efficient) choice:
$string =~ tr/a-zA-Z//cd;
See perlop for what tr///cd does.
--In reply to Re: Stripping characters...
by fruiture
in thread Stripping characters...
by powerhouse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |