I am trying to implement the enforcement of password complexity through regular expressions on both client (JavaScript) and server side (ASP.NET C#).
The rules are the following:
- Must be 8-40 characters
- Must contain at least one digit
- Must contain at least one lowercase letter
- Must contain at least one uppercase letter
- Must contain at least one special character
Can you please help construct the regular expression needed to validate the above?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…