Validation
Password (No Special Chars)
Validate passwords requiring at least one lowercase, one uppercase, one digit, and minimum 8 characters — no special characters required.
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d]{8,}$Raw source: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d]{8,}$
How it works
Three positive lookaheads (?=.*[a-z]) (?=.*[A-Z]) (?=.*\d) require a lowercase letter, uppercase letter, and digit somewhere in the string. [A-Za-z\d]{8,}$ then matches 8+ alphanumerics. Lookaheads are zero-width so they don't consume — they're constraints, not consumers. Note: Go's RE2 does not support lookaheads, so this pattern won't compile there.
Examples
Input
Password1Matches
Password1
Input
MyPass99Matches
MyPass99
Input
weakpassNo match
—Common use cases
- •Lightweight signup form validation
- •Password reset flows
- •Internal-tool password rules
- •Transitional rule when migrating from legacy systems