//6-16个字符,字母加数字或符号的组合密码[必须全部包含]
var filter = /^(?=.*[0-9])(?=.*[a-z])(?=.*[[email protected]#$%^&*])(?=.*[A-Z]).{6,16}$/ console.log(filter.test(‘q1234567‘))
//随意组合
var filter = /^(?=.*[0-9\[email protected]#\$%\^&\*])(?=.*[a-zA-Z]).{6,16}$/ console.log(filter.test(‘q1234567‘)) // true
时间: 2024-10-14 05:16:26