Four In A Row
A Connect Four board, 7 wide and 6 tall, arrives as one flat string. Capture the colour — R or Y — that has four in a row horizontally. Capture nothing if neither has.
Rows are flattened top-left first, . for an empty slot, with 6 hash characters between one row and the next — one fewer than the width. Horizontally is the easy direction: the padding guarantees a run of four can never straddle two rows, so you are looking for four identical neighbours and nothing more. Only horizontal counts here; a column of four is somebody else's problem. Capture the colour once — group 1 is the winner.
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.red, along the bottom
→ ["Y"].......######.......######.......######..R....######.YYYY..######.RRYRR.must not match.......######.......######..R....######..R.Y..######..RYY..######.YRYRR.red has four, but stacked — not horizontal
must not match.......######.......######.......######.......######...Y...######..RYR..must not match.......######.......######.......######.......######.......######.......nobody has played
+ 4 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.