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

All lookahead and lookbehind commands · Regular expressions pcre2 cheatsheet

Was this page helpful?