Strong Password
Enforce strong passwords: min 8 chars, at least one lowercase, uppercase, digit, and special character.
Try it in RegexPro →Available in
Pattern
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d\s]).{8,}$Raw source: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d\s]).{8,}$
How it works
Examples
Input
MyP@ssw0rdMatches
MyP@ssw0rd
Input
password123No match
—Input
SHORT1!No match
—Common use cases
- •User registration form validation
- •Password policy enforcement
- •Admin panel access controls
- •Security compliance checks
Related patterns
Password (No Special Chars)
ValidationValidate passwords requiring at least one lowercase, one uppercase, one digit, and minimum 8 characters — no special characters required.
bcrypt Password Hash
SecurityMatch bcrypt password hashes in their canonical $2a$/$2b$/$2y$ prefixed format.
Generic API Key
SecurityMatch generic long alphanumeric tokens (32+ chars) typical of API keys and access tokens.
Positive Lookahead (Password)
Text ProcessingUse positive lookahead `(?=...)` to require the password contain at least one digit and one uppercase letter.
Related concepts
Anchors: ^ and $ Explained
ConceptAnchors match positions, not characters. ^ asserts the start of the string (or line, with the m flag) and $ asserts the end.
Lookahead and Lookbehind
ConceptLookarounds assert a condition at a position without consuming characters. (?=X) is lookahead, (?<=X) is lookbehind. ! negates them.