Skip to content

Instantly share code, notes, and snippets.

@Uriel29
Created September 14, 2020 16:52
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 Uriel29/28651dda279e48eebee5fa92302b4576 to your computer and use it in GitHub Desktop.
Save Uriel29/28651dda279e48eebee5fa92302b4576 to your computer and use it in GitHub Desktop.
while (true) {
const password = gets();
if (password.length === 0) {
break;
}
checaSenha(password);
}
function checaSenha(senha)
{
var passw = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,32}$/;
if(senha.match(passw)){
console.log('Senha valida.')
}else{
console.log('Senha invalida.')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment