in reply to Re: regex question
in thread regex question
$string =~ tr/A-Za-z0-9.-_//cd;You forgot to escape the hyphen, the one you want taken literally:
$string =~ tr/A-Za-z0-9.\-_//cd;
Yours will keep everything in the range
too, which is more than you wanted../0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: regex question
by davido (Cardinal) on Dec 06, 2006 at 07:25 UTC |