适用于Active Directory密码策略的正则表达式

时间:2014-01-28 12:20:30

标签: javascript regex active-directory

我需要具有以下条件的Active Directory密码策略的正则表达式。 我的要求是:

at least one digit (0-9)
at least one lowercase character
at least one uppercase character
must contain at least one special character and 
the length should be minimum 8 characters and maximum of 25

1 个答案:

答案 0 :(得分:3)

试试这个。它包括空格键验证。

((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\W]).{8,25})