EasyRegex Logo
EasyRegex
Nuevo

Validate Password Strength

Javascript

Expresión Regular

^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Copiar
¿Tienes Comentarios?

Explicación

This regex pattern enforces the following rules for password strength: at least one lowercase letter, one uppercase letter, one digit, one special character (@$!%*?&), and a minimum length of 8 characters.

Javascript

Ejemplo de Uso

const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/; const isValidPassword = passwordRegex.test('StrongP@ssw0rd');
Copiar
Prueba la expresión

Expresiones Regulares Similares