I
IanW
Can anyone tell me why the following doesn't return "Not standards
compliant"?
my $em = ',[email protected]'; # note the comma in fornt of the email
address
if ($em =~
/^(?!\.)[!\#\$%&'*+-\/=?^_`{|}~.a-zA-Z0-9]+(?<!\.)\@(?!\.)[a-zA-Z0-9-.]+$/)
{
print "Standards compliant";
}
else {
print "Not standards compliant";
}
If you put a '.' or ':' or ';' etc in front of the address it comes back
with not compliant but when it's a comma it comes back as compliant. Is this
a bug or is the fault in my code?
Thanks
Ian
compliant"?
my $em = ',[email protected]'; # note the comma in fornt of the email
address
if ($em =~
/^(?!\.)[!\#\$%&'*+-\/=?^_`{|}~.a-zA-Z0-9]+(?<!\.)\@(?!\.)[a-zA-Z0-9-.]+$/)
{
print "Standards compliant";
}
else {
print "Not standards compliant";
}
If you put a '.' or ':' or ';' etc in front of the address it comes back
with not compliant but when it's a comma it comes back as compliant. Is this
a bug or is the fault in my code?
Thanks
Ian