Skip to content

Instantly share code, notes, and snippets.

@adamsilver
Created October 28, 2010 11:16
Show Gist options
  • Save adamsilver/651133 to your computer and use it in GitHub Desktop.
Save adamsilver/651133 to your computer and use it in GitHub Desktop.
var regex = /^(?=(.*\d){2,})(?=(.*[a-zA-Z]){2,})[a-zA-Z0-9]{6,}$/;
regex.test("abcdefg");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment