Skip to content

Instantly share code, notes, and snippets.

@mcsee

mcsee/type coupling.java

Last active Apr 5, 2021
Embed
What would you like to do?
public bool CheckIfStringHas3To7LowercaseCharsFollowedBy3or4Numbers(string string)
{
Regex regex = new Regex(@"[a-z]{2,7}[1-9]{3,4}")
var hasMatch = regex.IsMatch(string);
return hasMatch;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment