>>>>> "Lrmk" == Lrmk  <[EMAIL PROTECTED]> writes:

Lrmk> if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){

Lrmk> but I am not sure about the illegal chars for an e-mail address

Yup, fails on about 99% of the *legal* addresses, and permits *illegal*
addresses.

Two very important clues:

        \w matches *too much* for a domain name ("_" is not legal)
        nearly *any* char can appear in the "local part" (left of @)

For example:

        fred&[EMAIL PROTECTED]

is a valid email address (try it, it's an autoresponder).

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to