驗(yàn)證密碼強(qiáng)度的Regex我的密碼強(qiáng)度標(biāo)準(zhǔn)如下:8個(gè)字符長(zhǎng)度上裝2個(gè)字母1個(gè)特殊字符(!@#$&*)2個(gè)數(shù)字(0-9)3封小寫字母有人能給我同樣的補(bǔ)償嗎。所有條件必須通過密碼滿足。
3 回答

慕的地6264312
TA貢獻(xiàn)1817條經(jīng)驗(yàn) 獲得超6個(gè)贊
^(?=.*[A-Z].*[A-Z])(?=.*[!@#$&*])(?=.*[0-9].*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8}$
^ Start anchor (?=.*[A-Z].*[A-Z]) Ensure string has two uppercase letters. (?=.*[!@#$&*]) Ensure string has one special case letter. (?=.*[0-9].*[0-9]) Ensure string has two digits. (?=.*[a-z].*[a-z].*[a-z]) Ensure string has three lowercase letters. .{8} Ensure string is of length 8. $ End anchor.

幕布斯7119047
TA貢獻(xiàn)1794條經(jīng)驗(yàn) 獲得超8個(gè)贊
(?=.{8,})(?=.*\p{Lu}.*\p{Lu})(?=.*[!@#$&*])(?=.*[0-9])(?=.*\p{Ll}.*\p{Ll})
\p
\p{Lu}
[A-Z]
\p{Ll}
[a-z]
.
- 3 回答
- 0 關(guān)注
- 869 瀏覽
添加回答
舉報(bào)
0/150
提交
取消