Mailbox regular expression implementation code (for php)_PHP tutorial

WBOY
Release: 2016-07-21 15:04:25
Original
923 people have browsed it

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";
}

www.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...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!