Mobile (China Mobile phone number): regexp= "^ (((D{3})) | ( d{3}-))? 13[456789]d{8}|15[89]d{8} "
All mobile phone Number: regexp= "^ ((d{3}) | ( d{3}-))? 13[0-9]d{8}|15[89]d{8} "(New 158,159 two segments added)
This article describes the verification of the phone number of the regular expression, including the latest 186,188 number Oh, as follows:
Verify whether the phone number is regular: "^" (13[0-9]|15[0|3|6|7|8| 9]|18[6|8| 9]) d{8}$ "
Verify that the mobile phone number is positive: "^1 (3[4-9]|5[012789]|8[78]) d{8}$"
Use regular expressions to match cell phone number--java source code
The positive of the cell phone number verification is:
var reg =/^0{0,1} (13[0-9]|15[7-9]|153|156|18[7-9]) [0-9]{8}$/;
var reg =/^0{0,1} (13[0-9]|15[0-9]) [0-9]{8}$/;
The verification of mobile phone number is as follows:
var reg =/^0{0,1} (13[4-9]|15[7-9]|15[0-2]|18[7-8]) [0-9]{8}$/;
2009.11.23 New Increase mobile 151,152, but did not release in the source tutorial demo, the following code has been updated
Look at an example
function Checkchinamobileid (MOBILE) {
if (mobile== "") {
Alert ("Please fill in your mobile number!") ");
return false;
}
if (isNaN (mobile) | | (mobile.length!=11)) {
Alert ("Mobile phone number is 11 digits!") Please fill in the correct! ");
return false;
}
var reg =/^0{0,1} (13[4-9]|15[7-9]|15[0-2]|18[7-8]) [0-9]{8}$/;
if (!reg.test (mobile))
{
Alert ("Your mobile number is not a mobile number, please re-enter");
return false;
}
Alert ("Big uncle, this really mobile phone number");
return true;
}
function Checkismobile (MOBILE) {
if (mobile== "") {
Alert ("Please fill in your mobile number!") ");
return false;
}
if (isNaN (mobile) | | (mobile.length!=11)) {
Alert ("Mobile phone number is 11 digits!") Please fill in the correct! ");
return false;
}
var reg =/^0{0,1} (13[0-9]|15[0-9]) [0-9]{8}$/;
if (!reg.test (mobile))
{
Alert ("Your cell phone number is incorrect, please re-enter");
return false;
}
Alert ("Big uncle, this is really mobile phone number, is where I do not know");
return true;
}
Cell phone number validation regular expression
The positive of the mobile number verification is: VAR reg =/^0{0,1} (13[0-9]|15[7-9]|153|156|18[7-9]) [0-9]{8}$/; var reg =/^0{0,1} (13[0-9]|15[0-9]) [0-9]{8}$/; Mobile phone number verification is: VAR reg =/^0{0,1} (13[4-9]|15[7-9]|15[0-2]|18[7-8]) [0-9]{8}$/; Mobile phone number verification regular expression yesterday, finally found a station on the phone number of the regular expression of the verification to be stripped down, the number of mobile phone verification is: Var reg =/^0{0,1} (13[0-9]|15[7-9]|153|156|18[7-9]) [0-9]{8} $/; var reg =/^0{0,1} (13[0-9]|15[0-9]) [0-9]{8}$/; Mobile phone number verification is: VAR reg =/^0{0,1} (13[4-9]|15[7-9]|15[0-2]|18[7-8]) [0-9]{8}$/; New Add move 151,152 segment, but did not release in the source demo, the following code has been updated this is included in the 15x section of the HA
One more JS, verify your phone number.
<script type= "Text/javascript Tutorial" >
function Checktelephone (obj) {
var reg=/^[1][358]d{9}$/; Verify your phone number
var Phone=document.getelementbyid (' telephone '). Value;
if (!reg.test (phone)) {
Alert ("Phone number format is wrong!");
Obj.value= "";
Obj.focus ();
return false;
}else{
Alert ("Your phone number:" +phone);
return true;
}
}
</script>
<body>
<form>
<input type= "text" id= "Telephone" onblur= "Checktelephone (This)" >
</form>
</body>