$self->{_Email} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $self->{_Email} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/
should be $self->{_Email} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $self->{_Email} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/ Regards, David ----- Original Message ----- From: "Soheil Shaghaghi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 10, 2002 1:41 AM Subject: Problem with the code Hi everyone, The following sub checks for bad e-mail address, and reports it: if (($self->{_Email} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $self->{_Email} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/)) { $cool = undef; # No longer cool $message = $self->{_EmailInvalidMessage}; my $m = MessageText->new(Replacements => \%r, Message => $message); $self->{_ErrorEmail} = $m->print; } However, the code is rejecting the domains ending with .info, and .name (the reason is that it has 4 digits after the zero) Can someone please tell me how to change this code so it works please. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]