Pattern patClave = Pattern.compile("((?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]))"); Matcher matClave = patClave.matcher(clave);