PHP Mail Validation

Mail Validation

<?
$mail = "shit@SHIT.COMdsa";
if (!preg_match('/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i', $mail)) {
  echo "ok";
}
?>