It's already been said here, but it's worth saying again:
Don't try to exclude all `illegal' or `invalid' characters. You'll never get them all. Instead, decide what you will accept, and make sure your input contains that, and nothing else.
I'd write your regexp something like this:
unless ( $display =~ /^[a-z0-9\-\.]+$/ ) { # Invalid input }
In reply to Re: validation of posted data.
by DamnDirtyApe
in thread validation of posted data.
by hostux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |