var patternMainLand = /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/;//大陆
var patternHongkong = /([A-Za-z](\d{6})\(\d\))|(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X|x)/; //香港、大陆
var patternTaiwan = /^[a-zA-Z][0-9]{9}$/;//台湾
var patternMacao = /^[1|5|7][0-9]{6}\([0-9Aa]\)/;//澳门
---------------------
参考资料:https://blog.csdn.net/leonshenzhi/article/details/83144686