Source Code:
(back to article)
<?php $email = "some@email.com"; if (preg_match("~([a-zA-Z0-9!#$%&'*+-/=?^_`{|}~])@([a-zA-Z0-9-]).([a-zA-Z0-9]{2,4})~", $email)) { echo 'This is a valid email.'; } else { echo 'This is an invalid email.'; } ?>
Result:
Report an issue