Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active August 26, 2023 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcsee/91e3a3f2b1351fa0e09fb8c56a5c2779 to your computer and use it in GitHub Desktop.
Save mcsee/91e3a3f2b1351fa0e09fb8c56a5c2779 to your computer and use it in GitHub Desktop.
public bool CheckIfStringHas3To7LowercaseCharsFollowedBy3or4Numbers
(string password)
{
Regex stringHas3To7LowercaseCharsFollowedBy3or4Numbers =
new Regex(@"[a-z]{2,7}[1-9]{3,4}")
var hasMatch =
stringHas3To7LowercaseCharsFollowedBy3or4Numbers.IsMatch(password);
return hasMatch;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment