I've come across the following regular expression for checking to see if an email address is the correct format:
| | $email !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) {
If it matches the first regular expression or doesn't match the second, it's not a correct format. (The script I got it from explains how it works, but I just take his word for it! )
How would I translate that into a valid expression to put into the .cfg file?
------------------
JPD
[This message has been edited by JPDeni (edited January 19, 1999).]
Code:
if ($email =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ | | $email !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) {
If it matches the first regular expression or doesn't match the second, it's not a correct format. (The script I got it from explains how it works, but I just take his word for it! )
How would I translate that into a valid expression to put into the .cfg file?
------------------
JPD
[This message has been edited by JPDeni (edited January 19, 1999).]