RegexWars
Tier 2 · Archmagematch

Strong Enough

Match passwords of at least 8 characters that contain at least one digit and at least one capital letter.

Three conditions over the same text, in any order. A lookahead checks a condition at a position without consuming anything, so you can stack several of them at the start and then match the string properly afterwards.

Your pattern0 chars · par 26
//
Flags
Start typing — tests run as you go.0 of 5 visible tests passing
Test cases
  • Passw0rdmust match
  • A1bcdefgmust match
  • password1must not match

    no capital

  • PASSWORDmust not match

    no digit

  • Pa55must not match

    too short

+ 8 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.