<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="txtPassword" ErrorMessage="can not use this password"
Font-Bold="True" ForeColor="White"
ValidationExpression="(?=^.{8,}$)(?=.*\d)(?=.*\W+)(?![.\n]).*$">
</asp:RegularExpressionValidator>
What does the ValidationExpression "(?=^.{8,}$)(?=.*\d)(?=.*\W+)(?![.\n]).*$" look for?
It validates that the password is at least eight characters in length, containing at least one number or special character.
This expression might be better for password strength:
The above expression will validate that the password contains: