Jump to content

[SOLVED] matching email with regular expression


aebstract

Recommended Posts

So I'm trying to match an email with a regular expression to make sure it is at least a valid email in some sort of way.

 

  } elseif (!preg_match('\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b',$_POST['email1'])) {

 

Entering an actual email address and I'll return my error on the next line that it is invalid. I'm thinking I got some sort of syntax with the preg_match incorrect?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.