Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

preg_match in php

<?php
$my_email = "name@company.com";
if (preg_match("/^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+.[a-zA-Z.]{2,5}$/", $my_email)) {
echo "$my_email is a valid email address";
}
else
{
  echo "$my_email is NOT a valid email address";
}
?>
Source by www.guru99.com #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
2+6 =