By the end of June 2015, there are several mobile phone numbers available:
A. Electrical signal section: 133/153/180/181/189/177;
B. China Unicom segment: 130/131/132/155/156/185/186/145/176;
C. Mobile number segment: 134/135/136/137/138/139/150/151/152/157/158/159/182/183/184/187/188/147/178.
The regular expression is:
/^ ((1[3,8][0-9]) | (15[0,1,2,3,5,6,7,8,9]) | (14[5,7]) | (17[0,6,7,8])) \d{8}$/
The sample code is as follows:
<!DOCTYPE HTML><HTMLLang= "en"> <Head> <MetaCharSet= "UTF-8"> <Metaname= "Author"content=""> <Metaname= "Keywords"content=""> <Metaname= "Description"content=""> <title>Document</title> </Head> <Body> <inputtype= "text"ID= "Tel"/> <Buttononclick= "Javascript:checktel ();">Check</Button> <Script> functionChecktel () {varTel=document.getElementById ('Tel'). Value; varRegExp= /^ ((1[3,8][0-9)) | ( 15[0,1,2,3,5,6,7,8,9]) | (14[5,7]) | (17[0,6,7,8])) \d{8}$/; if(!Regexp.test (tel)) {Alert ("The phone number you entered is not formatted correctly, please re-enter"); } } </Script> </Body></HTML>
2015-06-30 (latest) mobile phone number Regular expression-check example