Hi PPL, I wrote a regex to verify an email address if(!preg_match("^[a-z0-9]+@{1}[a-z0-9-]+\.{1}[a-z]{2,4}\.?[a-z]{0,2}$",$myemail)) echo "Invalid Email"; Code (markup): Please take a look and tell me if this will work for all type of emails, For example: OR OR and other emails also... Thanx
Why using regex? If you are running PHP 5.2.1 or higher you can use FILTER_VAR with FILTER_VALIDATE_EMAIL, just as easy as it can be
Why use something else to do something if it is already built in? It won't hurt anything, but why bother? Just follow the given code.