http://www.perlmonks.org?node_id=394225


in reply to Re^4: Regex for weird characters
in thread Regex for weird characters

No, you aren't. Thus the reason that your a-z0-9 works fine. As a contribution to the thread:
# cat match.pl #!/usr/bin/perl -l while (<DATA>) { chomp; print "$_ " . (/[^a-z0-9!\@#\$%^&*(),.?~:;<>+ =_'"-]/ ? "contains w +eird stuff":"is fine"); } __DATA__ funky town ^-^ b* f1 top` # perl match.pl funky town is fine ^-^ is fine b* is fine f1 is fine top` contains weird stuff #

Replies are listed 'Best First'.
Re^6: Regex for weird characters
by sulfericacid (Deacon) on Sep 27, 2004 at 16:25 UTC
    I thought a-z0-9 was different because you're given a range of characters instead of singly adding them yourself.

    Thanks for correcting my code though.



    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid