Alibabacloud.com offers a wide variety of articles about regular expression to validate email address, easily find your regular expression to validate email address information here online.
Use the js regular expression to verify the mobile phone number, email address, and zip code. If you want to verify your mobile phone number, you can refer to it for reference. (11 digits are entered at the beginning of "13" and "158,159)
The Code is as follows:
Var re;Var ss = document. getElementById ('textbox3 ').
using capture references for storage and comparison and verification. Think of it as an exercise question (it suddenly seems like a math question in high school ).
The instance code is as follows:
Test: Use a Javascript Regular Expression to verify the Email address
E
Regular expression verification email address and phone number
Verify the regular expression of the phone number:(\ D {3}-) (\ d {8}) $ | (\ d {4}-) (\ d {7 }) $ | (\ d {4}-) (\ d {8}) $(The new phone number is used h
This article mainly introduces the PHP regular expression library implementation of email address verification, interested in the friend's reference, I hope to help you.
The code is as follows:
Summary: The above is the entire content of this article, I hope to be able to help you learn.
Implementation ideas:
1. Use a java.net. url object to bind a webpage address on the network
2. Obtain an httpconnection object through the openconnection () method of the java.net. url object.
3. Use the getinputstream () method of the httpconnection object to obtain the input stream object inputstream of the network file.
4. read each row of data in the stream cyclically, and use the regular
PHP Regular expression used in a lot of places are possible to use, we first introduce you to the PHP regular expression in a certain mode, as well as a function of parsing, in our work, we often encounter the verification mailbox, then today we will take you to understand the next PHP
In the previous article, we used the string SEARCH method to verify the asp email address. Some friends may prefer regular expressions. The corresponding code is also provided here.Method 1 Copy codeThe Code is as follows:Public Function ChkMail (ByVal Email)Dim Rep, Pmail: ChkMail = True: Set Rep = New RegExpRep. patt
In python, the django framework uses the regular expression to search for the email address on the page.
This example describes how to use the django framework in python to search for the email address on the page through
For WEB development, form verification is essential, so we list some common verifications today. Haha, The JS regular expression we just learned this afternoon, I hope you can criticize and correct any shortcomings.
I. Related codeCopy codeThe Code is as follows:Function test (){Var temp = document. getElementById ("text1 ");// Email VerificationVar myreg =/^ ([a
This article mainly introduces the method of using the django framework in python to search for the email address on the page through regular expressions. it involves the usage skills of the django framework and regular expressions, for more information, see the example in this article. Share it with you for your refer
verification of mobile phone number (13 start and 158,159, total 11 digits) var Ss=document.getelementbyid (' TextBox3 '). Value;var re=/^ (13[0-9]{9}) | (15[89][0-9]{8}) $/if (Re.test (ss)){document.getElementById (' Label3 '). innertext= ""; Assigning a value to a label with innertext}Else{document.getElementById (' Label3 '). innertext= "Please enter the correct mobile phone number! ";document.getElementById (' ImageButton1 '). Disabled=true; Disable button with disabled}Verification of the
Use JS Regular expression to verify the phone number, email address, zip code. Need friends can come to the reference, I hope to help you. Cell phone number verification (13 opening and 158,159 beginning, total 11 bits) nbsp; code as follows: Var re; var Ss=document.getelementbyid (' TextBox3 '). Value; Re=/^ (13[0-9]
to decide whether a whole string of strings matches is an assertion. such as ^ $
The code is as follows
Copy Code
/^ ([w._]{2,10}) @ (W{1,}). ([a-z]{2,4}) $/
Note the head and tail plus ^ $
The code is as follows
Copy Code
$a = '/^ ([w._]{2,10}) @ (W{1,}). ([a-z]{2,4}) $/';$b = ' 1412424545645454545454545k@qq.com ';if (Preg_match ($a, $b)) {echo "e-mail Legal";}else{echo "e-mail is illegal";}
Okay, I'm going to do a
Fuchangxi regular: Copy codeThe Code is as follows:/^ ([A-zA-Z0-9 _-]) + @ ([a-zA-Z0-9 _-]) + (. [a-zA-Z0-9 _-]) +/ It must start with one or more word characters or-, plus @, and then one or more word characters or -. Then there is a combination of "." And the word character and-. There can be one or more combinations.Copy codeThe Code is as follows: I am not familiar with the specific mailbox rules. It seems that this
I. Related code1 function test ()2 {3 var temp = document. getElementById ("text1 ");4 // email Verification5 var myreg =/^ ([a-zA-Z0-9] + [_ | \.]?) * [A-zA-Z0-9] + @ ([a-zA-Z0-9] + [_ | \.]?) * [A-zA-Z0-9] + \. [a-zA-Z] {2, 3} $ /;6 if (! Myreg. test (temp. value ))7 {8 alert ('prompt \ n please enter a valid E_mail! ');9 myreg. focus ();10 return false;11}12}13 // because the methods are the same, write only the relevant
Verification of mobile phone numbers (starting with 13 and starting with 158,159, 11 digits in total)Copy codeThe Code is as follows:Var re;Var ss = document. getElementById ('textbox3 '). value;Re =/^ (13 [0-9] {9}) | (15 [89] [0-9] {8}) $/If (re. test (ss )){Document. getElementById ('label3'). innerText = ""; // assign a value to the label using innerText}Else{Document. getElementById ('label3'). innerText = "enter the correct mobile phone number! ";Document. getElementById ('imagebutton1').
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.