im learning about regular expressions and quantifing and im doing an exercise to validate an email address.
i can't seem to quantifie an exact amount of letters using
[a-z]{3} to say exactly three letters.
the script below just doesn't seem to see the email as FALSE and prints the TRUE response instead.
i just can't see what im doing wrong??
$email ='rick@popex.comm'; # com has 4 letters not 3.
if ($email =~ m/[a-z]+@[a-z]+\.[a-z]{3}/)
{
print "yeah\n";
print $email;
}
else
{
print.......
any help would be great..........rick
i can't seem to quantifie an exact amount of letters using
[a-z]{3} to say exactly three letters.
the script below just doesn't seem to see the email as FALSE and prints the TRUE response instead.
i just can't see what im doing wrong??
$email ='rick@popex.comm'; # com has 4 letters not 3.
if ($email =~ m/[a-z]+@[a-z]+\.[a-z]{3}/)
{
print "yeah\n";
print $email;
}
else
{
print.......
any help would be great..........rick