Regular expressions pcre2 · Lookahead and lookbehind
Require several conditions at once
Use lookaheads at the start to require a lowercase letter, an uppercase letter, a digit and 8 or more characters.
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$
Official Regular expressions pcre2 documentation
More lookahead and lookbehind commands
- Match only if followed by something
- Match only if not followed by something
- Match only if preceded by something
- Match only if not preceded by something
All lookahead and lookbehind commands · Regular expressions pcre2 cheatsheet