EasyRegex Logo
EasyRegex
Nouveau

Validate Password Strength

Javascript

Expression Régulière

^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Copier
Avez-vous des Retours ?

Explication

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

Exemple d'Utilisation

const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/; const isValidPassword = passwordRegex.test('StrongP@ssw0rd');
Copier
Testez l'expression

Expressions Régulières Similaires