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
Related patterns
Strong Password
SecurityEnforce strong passwords: min 8 chars, at least one lowercase, uppercase, digit, and special character.
Alphanumeric Only
ValidationMatch strings containing only letters (A–Z, a–z) and digits (0–9), with no spaces or special characters.
International Phone (E.164)
ValidationValidate phone numbers in ITU-T E.164 international format: a + sign followed by 2–15 digits, first digit non-zero.
Username
ValidationValidate usernames that are 3–16 characters long and contain only letters, digits, underscores, and hyphens.