Connect Four
The same 7x6 Connect Four board, but now a win counts in any direction — across, down, or either diagonal. Capture the winning colour, or nothing.
Rows flattened top-left first, . for empty, 6 hash characters between rows. With 6 characters of padding a row is 13 characters wide from one square to the one below it, so every direction is a fixed stride from the square before: 1 across, 13 straight down, 14 down-right, 12 down-left. Four squares, three steps, one stride — and it must be the SAME stride all three times, or you are matching a zigzag rather than a line. The padding is what stops a diagonal walking off the right edge and reappearing on the left.
Wrapped into rows of 7 so you can see the board. The string itself is one line with no line breaks in it — the 6 # between rows are ordinary characters, and a dot will happily match straight past them.
→ ["R"].......######.......######.......######.......######..Y.Y..######.RRRRY.across
→ ["Y"].......######.......######....Y..######....Y..######..R.Y..######.RRRY..down
→ ["R"].......######.......######R......######YR.....######YYR....######YRYR...down-right
→ ["Y"].......######.......######......Y######.....YR######....YRR######...YRRYdown-left
must not match.......######.......######...R...######..RY...######.RYY...######YYRR...three in a row in two directions, four in neither
must not match.......######.......######.......######.......######.......######.......
+ 5 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.