# 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 #
In reply to Re^5: Regex for weird characters
by !1
in thread Regex for weird characters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |