What I should have said (and intended to but didn't) is:
tr/A-Za-z0-9._-//cd;
The hyphen doesn't have special meaning in that case. I even did that when I composed the character class demonstrated in my s/// example, but somehow missed it in the tr/// example.
Good catch bart. :) You've got to love Perl's density huh? ;)
Dave
In reply to Re^3: regex question
by davido
in thread regex question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |