标签:常用 read 校验 idcard git https jin test nts
const regExp = /^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[35678]\d{2}|4(?:0\d|1[0-2]|9\d))|9[189]\d{2}|66\d{2})\d{6}$/
// example
regExp.test(15878673234) // true
const regExp = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
参考:
标签:常用 read 校验 idcard git https jin test nts
原文地址:https://www.cnblogs.com/rosendolu/p/11615881.html