2. email address validationif ($who !~ /[A-Za-z]/) ... # thanks to eric256 to point out the prob +lem if ($who2 !~ /[A-Za-z]/) ... # in my regexp. I really meant to use a n +egative # regexp. If any character not alphabetic +al. ^_^
Ok, what I did was perhaps too simple here. You should really use the Mail::Address module to check/obtain the canonical form of the Email address properly.if ($email =~ /@/) ...
Assume no space in the credit card number. Otherwise a simple check to strip out the space. Thanks to hardburn to point out the credit card checking modules. I was a bit lazy because Audrey Fong only wanted to check if there were 16 digits.if ($creditcard =~ /^\d{16}$/) ...
In reply to Re: Audrey Fong
by Roger
in thread Need help with regexes to validate user input
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |