let pwd = '123456'
let reg = new RegExp(/(?![\d]+$)(?![a-zA-Z]+$)(?![\da-zA-Z]+$).{6,20}$/); //6-20位,至少带字母数字符号中的两种的正则
let result = reg.test(pwd);
if(!result){
//do something
//不通过的
}
let pwd = '123456'
let reg = new RegExp(/(?![\d]+$)(?![a-zA-Z]+$)(?![\da-zA-Z]+$).{6,20}$/); //6-20位,至少带字母数字符号中的两种的正则
let result = reg.test(pwd);
if(!result){
//do something
//不通过的
}