The example of this article for everyone to share the JavaScript mobile phone number Verification Tool class Phoneutils specific code, for your reference, the specific content as follows
Phoneutils namespace phoneutils = {phoneregexs: {//China Telecom number segment China_telecom_pattern:/^ (?: \ +86)? 1 (?: 33|53|7[37]|8[019]) \d{8}$|^ (?: \ +86) 1700\d{7}$/,//China Unicom number segment China_unicom_pattern:/^ (?: \ +86)? 1 (?: 3[0-2]|4[5]|5[56]|7[56]|8[56]) \d{8}$|^ (?: \ +86) 170[7-9]\d{7}$/,//China Mobile number segment China_mobile_pattern:/^ (?: \ +86)? 1 (?: 3[4-9]|4[7]|5[0-27-9]|7[8]|8[2-478]) \d{8}$|^ (?: \ +86) 1705\d{7}$/,//Telephone landline number segment Phone_call_pattern:/^ (?: \ d3,4|\d{3,4}-)? \d{7,8} (?:-\ d{1,4})? $/,//Mobile number Phone_pattern:/^ (?: \ +86)? (?: 13\d|14[57]|15[0-35-9]|17[35-8]|18\d) \d{8}$|^ (?: \ +86) 170[057-9]\d{7}$/,//Mobile phone number simple check, not according to carrier classification Phone_simple_pattern:/^ (?: \ +86)? 1\d{10}$/},//Phone number isphonecallnum:function (input) {return this.phoneRegexs.PHONE_CALL_PATTERN.test (input); },//Telecom mobile number ischinatelecomphonenum:function (input) {return this.phoneRegexs.CHINA_TELECOM_PATTERN.test (input); },//China Unicom ischinaunicomphonenum:function (input) {return this.phoneRegexs.CHINA_UNICOM_PATTERN.test (input); },//China Mobile IschinamObilephonenum:function (Input) {return this.phoneRegexs.CHINA_MOBILE_PATTERN.test (input); },//Mobile number isphonenum:function (input) {return this.phoneRegexs.PHONE_PATTERN.test (input); },//mobile number simple check, only check the length isphonenumbysize:function (input) {return this.phoneRegexs.PHONE_SIMPLE_PATTERN.test (input); } };
More about Python in http://www.cnblogs.com/yoyonow/,
JavaScript Mobile number Verification Tool class Phoneutils detailed