in reply to email address validation regexp
The following pseudo-code properly "translates" this logic, so the question is: does it also express your true intent?if (!($MailFrom =~/\@*\./)) { $kill = 1; print "Invalid return address in From box. "; } if (!($MailTo !~/\@*\./)) { $kill = 1; print "Invalid destination address... "; }
Now if the criterion is supposed to be "@" followed by period, you should not have the asterisk after "@" -- this means "zero or more occurrences" of "@" preceding a period, so both "." and "@." match your /\@*\./ regex (but neither of them looks good to me as an email address).
|
|---|