标签:
var str = ‘82386012‘; var partten = /(^(0\d{2})-(\d{8})$)|(^(0\d{3})-(\d{7})$)|(^(0\d{2})-(\d{8})-(\d+)$)|(^(0\d{3})-(\d{7})-(\d+)$)|(^\d{7}$)|(^\d{8}$)/; if(partten.test(str)){ return true; }else{ return false; }
标签:
原文地址:http://www.cnblogs.com/kravis/p/5098402.html