Skip to content

Instantly share code, notes, and snippets.

@Xordal
Last active September 5, 2016 10:50
Show Gist options
  • Save Xordal/5e74f9e8c2808dfb256bfa12393f90b5 to your computer and use it in GitHub Desktop.
Save Xordal/5e74f9e8c2808dfb256bfa12393f90b5 to your computer and use it in GitHub Desktop.
Regexp: password validation
// minimum: one digit, one Uppercase, one Lowercase
(?=.*\d)(?=.*\p{Lu})(?=.*\p{Ll})(.|D){6,}
// 6 - minimum length
for c#:
String pattern = @"^(?=.*\d)(?=.*\p{Lu})(?=.*\p{Ll}).{6,}$";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment