What is the best Regular Expression to validate an email address in PHP?

I need to know the best regex to catch a valid email address for my web app. Please help.


  • newmindcorenewmindcore Yekaterinburg

    I am using this
    in most cases

  • Well, there is no PERFECT regex for this. The best way is coding your app to validate the email by confirmation where you will send an email to that email address with a confirmation link. Until the confirmation is done, you can limit access to your site.

    This tutorial nicely explains how to setup confirmation.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!