作者:儒妹妹_761 | 来源:互联网 | 2023-05-29 15:19
letreg^(?.[a-zA-Z])(?.\d)(?.*[~!#%^&*()_\-{}:;?,.\]).([^\s])([^\u4e00-\u9fa5]){8,20};le
let reg = /^(?=.[a-zA-Z])(?=.\d)(?=.*[~!@#%^&*()_+`\-={}:";&#39;<>?,.\/]).([^\s]+)([^\u4e00-\u9fa5]+){8,20}/;
let str=‘abc123/’
ret.test(str)