in reply to validate an email address ?

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Re: validate an email address ?
by KM (Priest) on Feb 16, 2001 at 22:42 UTC
    *@foo.com is a valid address, which your test doesn't check. And _ is not valid in a domain name, which will pass your test. etc...

    I'm sure some one has already posted this question before, maby you should search before asking next time.

    The poster should have. And you should have made sure your regex would actually make sure the email address is valid. It will fail on *@foo.com, which is a valid address, and pass on foo@foo_bar.com (which has a valid format, but couldn't possibly be a valid address).

    Best advice is to use Email::Valid, with MX host checking. Without it, it will also miss-pass on things like foo@foo_bar.com (well formed, yes.. valid.. no). Checking the MX host will curb that.

    Cheers,
    KM

Re: Re: validate an email address ?
by merlyn (Sage) on Feb 16, 2001 at 22:34 UTC