Which password does this pattern accept?
/^(?=.*\d)(?=.*[A-Z]).{8,}$/
- "Passw0rd"
- "password1"
- "Password"
- "PASS1"
Each lookahead checks one rule (a digit, an uppercase letter) and
Play Regex ▸
.{8,} enforces the length.