RegexWars
Tier 1 · Sorcerermatch

The Whole Grid

Eighty-one cells. Match the grid only when no digit repeats in any row, any column, or any 3×3 box.

Boards flatten row-major, top-left first, with (width − 1) hashes between rows: nine cells, eight hashes, nine cells, and so on — 145 characters in all. An empty cell is a full stop. The padding is the design decision, and it is doing real work. It makes a row exactly 17 characters, which is the stride you will need for columns; more importantly it means two cells are in the same row exactly when there is no hash between them. Strip it out and a row check has no edge to stop at. Twenty-seven constraints, but not twenty-seven pieces of pattern — rows collapse into one idea, columns into another, and boxes need the grid anchored from the start so a band boundary cannot be crossed. This is legality, not solvability. A grid that breaks no rule yet has no solution still matches.

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

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

  • 534678912########
    672195348########
    198342567########
    859761423########
    426853791########
    713924856########
    961537284########
    287419635########
    345286179
    must match

    a finished grid

  • 5..6..9..########
    ..2..5..8########
    .9..4..6.########
    8..7..4..########
    ..6..3..1########
    .1..2..5.########
    9..5..2..########
    ..7..9..5########
    .4..8..7.
    must match

    legal so far

  • 56.6..9..########
    ..2..5..8########
    .9..4..6.########
    8..7..4..########
    ..6..3..1########
    .1..2..5.########
    9..5..2..########
    ..7..9..5########
    .4..8..7.
    must not match

    the same grid with a 6 added: two 6s in the top row

  • 51.6..9..########
    ..2..5..8########
    .9..4..6.########
    8..7..4..########
    ..6..3..1########
    .1..2..5.########
    9..5..2..########
    ..7..9..5########
    .4..8..7.
    must not match

    a 1 instead: two 1s down the second column

  • 52.6..9..########
    ..2..5..8########
    .9..4..6.########
    8..7..4..########
    ..6..3..1########
    .1..2..5.########
    9..5..2..########
    ..7..9..5########
    .4..8..7.
    must not match

    a 2 instead: legal in its row and its column, twice in its box

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