密码正则
REGEX_USER: /^((?=.*\d)(?=.*[a-zA-Z])|(?=.*\d)|(?=.*[a-zA-Z])).{1,50}$/,
REGEX_USER: /^(?![\d]+$)(?![a-zA-Z]+$).{1,50}$/,
REGEX_PASS: /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{6,30}$/,
REGEX_PASS: /^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{6,30}$/,
REGEX_PASS: /^(?![\d]+$)(?![a-z]+$)(?![A-Z]+$)(?![^a-zA-Z0-9]+$).{6,30}$/,
REGEX_PASS: /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_]+$)(?![a-z0-9]+$)(?![a-z\W_]+$)(?![0-9\W_]+$)[a-zA-Z0-9\W_]{6,30}$/,
问题:
?= 与 ?! 的区别
为什么必须加 ^ 和 $ ,对于最少和最多位的限制才有效果?
.{6,30}$ 与 9\W_]{6,30}$, 加 . 和不加的区别。