Learn about regular expression for email validation, we have the largest and most updated regular expression for email validation information on alibabacloud.com
Most of the mailbox verification code is a domain name that cannot be verified with a letter or a letter of the user name, such as: I@fufuok.com or fufu@9.cn. Here's how to fix it:
1, does not make the total length judgment, the length judgment may add oneself;
2, support. net.cn,.com.cn such a domain name suffix;
3, the mailbox Name section begins with a letter or a number, the middle can have "-" and "_" symbol;
4, the Domain name section begins with a letter or a number, the middle can have "
This article mainly introduces php mail address regular expression verification. the php language is used to implement the e-mail address verification program, which uses the php regular expression library, if you are interested, you can refer to the verification we most often encounter, that is,
The code is as follows
Copy Code
function Funcemail ($STR)//mailbox Regular expression{Return (Preg_match ('/^[_.0-9a-z-a-z-]+@) ([0-9a-z][0-9a-z-]+.) +[a-z]{2,4}$/', $str))? True:false;}
Validation method One
The code is as follows
Copy Code
$str = "qbcd@126.com.cn";Preg_match ("/^[0-9a-z]+@" ([0-9a-z]+) [.]
How do we use to check the Regular Expression of email? What are the steps required to check the Regular Expression of email? The operation instance for checking the Regular
In the past, the regular expression was used to open the syntax document of the regular expression, and then re-reference and compare it one by one. Once it is used, it will be left behind, so I forget it every time I use it, every time I come back, no wonder the regular
Regular Expression for email address verification
Email address verification in dedecms CopyCodeThe Code is as follows: $ Email = "test@jb51.com ";// Check the email format
Function checkemail ($
Example of php regular expression verification Email address
This article introduces the example of using regular expressions in php to verify the Email address. For more information, see.Php implements an example of verifying the
, including excepting, 1, 3, 5, 7, 8, 10, December all included 31st(0[13578]|1[02])-31)All other dates except February 29 in a leap year(?! 0000) [0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-8]) | ( 0[13-9]|1[0-2])-(29|30) | (0[13578]|1[02])-31)
Then we'll solve the second difficulty: Leap year considerations. Based on the definition of leap years, we can divide a leap year into two categories:
1 years that can be divisible by 4 but not divisible by 100. Looking for the change rule of the latt
, -}$ the correct format is: Start with a letter, length in 6-18, only characters, numbers, and underscores can be included. Verify that you contain^%',; =?$\ "and other characters:[^%',; =?$\x22]+Verify Kanji:^[\u4e00-\u9fa5],{0,}$ Verify email address:^\w+[-+.] \w+) *@\w+ ([-.] \w+) *\.\w+ ([-.] \w+) *$ verify InternetURL:^http://([\w-]+\.) +[\w-]+ (/[\w-./?%=]*)? $; ^[a-za-z]+://(w+ (-w+) *) (. ( w+ (-w+) *) * (? s*)? $ verify Phone Number:^ (\ (\d
Verify the jQuery Validation Engine simple custom regular expression, jqueryvalidation
First on the Control Address http://code.ciaoca.com/jquery/validation-engine/
The specific method of use is clearly stated on the website. I wrote this article mainly to record how to add custom
in the correct format: start with a letter, length between 6~18, can contain only characters, numbers, and underscores.Verify that it contains ^% ",; =?$\" characters: "[^%", "=?$\x22]+".Only Chinese characters can be entered: "^[\u4e00-\u9fa5]{0,}$"Verify email Address: "^\w+ ([-+.] \w+) *@\w+ ([-.] \w+) *\.\w+ ([-.] \w+) *$ ".Verify InternetURL: "^http://([\w-]+\.) +[\w-]+ (/[\w-./?%=]*)? $ ".Verify the phone number: "^ (\ (\d{3,4}-) |\d{3.4}-)? \d
password: "^[a-za-z]\w{5,17}$" is in the correct format: start with a letter, length between 6~18, can contain only characters, numbers, and underscores. Verify that it contains ^% ",; =?$\" characters: "[^%", "=?$\x22]+". only Chinese characters can be entered: "^[\u4e00-\u9fa5]{0,}$"Verify Email Address: "^\w+ ([-+.] \w+) *@\w+ ([-.] \w+) *\.\w+ ([-.] \w+) *$ ". Verify InternetURL: "^http://([\w-]+\.) +[\w-]+ (/[\w-./?%=]*)? $ ". Verify the phone n
? Phpif (eregi (^ [_. 0-9a-z-] + @ ([0-9a-z] [0-9a-z-] + .) + [a-z] $, $ email) {echo your e-mail through a preliminary check ;}? In this sentence, an eregi function is first applied, which is quite understandable. If you look for a book, you can explain the syntax: intereg (stringpattern, st
If (eregi ("^ [_. 0-9a-z-] + @ ([0-9a-z] [0-9a-z-] +.) + [a-z] $", $ email )){Echo "your
The most common verification is email address verification. Websites are common. Various web scripts also use regular expressions "(Regular Expression) Verify the email address we entered to determine whether the email address is
The most common verification is email address verification. Websites are common. Various web scripts also use regular expressions "(Regular Expression) Verify the email address we entered to determine whether the email address is
Js:$ ("#email"). blur (function () {//Gets the value of the element corresponding to the ID, minus its left and right space var email = $.trim ($ (' #email '). Val ());//Verify the mailbox format of the JS regular expression var Isemail =/^\w+ ([-+.] \w+) *@\w+ ([-.] \w+) *\
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.