RegexWars
Tier 3 · Warlockmatch

Nobody Wins

Match a noughts and crosses board that is a draw: every square filled, and neither player with three in a row.

Same encoding as before — rows flattened top-left first, . for empty, 2 hash characters between rows, so the strides are 1, 5, 6 and 4. Two players, one pattern: capture whichever symbol starts a line and let a backreference insist the rest of the line matches it, rather than writing the eight lines out twice. Then say what must NOT be there, and check nothing is still empty.

Your pattern0 chars · par 67
//
Flags
Start typing — tests run as you go.0 of 6 visible tests passing
Test cases

Wrapped into rows of 3 so you can see the board. The string itself is one line with no line breaks in it — the 2 # between rows are ordinary characters, and a dot will happily match straight past them.

  • XOX##
    XOO##
    OXX
    must match
  • OXO##
    XXO##
    OOX
    must match
  • XXO##
    OOX##
    XXO
    must match
  • XXX##
    OOX##
    OXO
    must not match

    full, but X took the top row

  • OXX##
    XOO##
    XOO
    must not match

    full, but O took the diagonal

  • XOX##
    XO.##
    OXX
    must not match

    nobody has won yet — it is not over

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