S
Samik R.
Hello,
I use the following regular expression to catch typical invalid email
addresses:
------------
my @Email=("sam._\@abc.org", "sam_.\@abc.org", "sam_.\@abc.org");
foreach (@Email)
{
if(/^[A-z0-9]+([_\.][A-z0-9\-]+)*[@][A-z0-9_\-]+([.][A-z0-9_\-]+)?\.[A-z]{2,3}$/)
{ print "$_ is a valid email id\n"; }
else
{ print "$_ is an invalid email id\n"; }
}
-------------
This expression does not catch the above 3 emails in the array (the
program says that they are valid emails).
Can someone help me to discard these three?
Thanks.
I use the following regular expression to catch typical invalid email
addresses:
------------
my @Email=("sam._\@abc.org", "sam_.\@abc.org", "sam_.\@abc.org");
foreach (@Email)
{
if(/^[A-z0-9]+([_\.][A-z0-9\-]+)*[@][A-z0-9_\-]+([.][A-z0-9_\-]+)?\.[A-z]{2,3}$/)
{ print "$_ is a valid email id\n"; }
else
{ print "$_ is an invalid email id\n"; }
}
-------------
This expression does not catch the above 3 emails in the array (the
program says that they are valid emails).
Can someone help me to discard these three?
Thanks.