I have been copying phone numbers and email regular expressions written by others on the Internet. Today I have a little leisure and fulfilled my wish of writing such an expression myself:
Copy code The code is as follows:
/**
* Email address regular expression
*/
$preg = '/^(w{1,25})@(w{1,16 })(.(w{1,4})){1,3}$/';
$b = 'ffgddayasdadasdf@gmialsdfsdfasd3.com.cn.org';
if(preg_match($preg, $b)){
echo "Matched";
}else{
echo "No match";
}
http://www.bkjia.com/PHPjc/327780.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327780.htmlTechArticleI have been copying phone numbers and email regular expressions written by others online. I have a little leisure today and I have been thinking about it. My wish to write such an expression is fulfilled: Copy the code as follows...