邮箱匹配:var re = /^[A-Za-zd]+([-_.][A-Za-zd]+)*@([A-Za-zd]+[-.])+[A-Za-zd]{2,4}$/;汉字匹配: reg=/^([u4e00-u9fa5]){2,7}$/ 在js调用一下: if (re.test("123456@vip.qq.123.123.com")) { alert("success"); }
转载地址:https://www.cnblogs.com/stellar/p/5888163.html