Clashes In The Box
A Sudoku box, flattened. Extract every digit that appears again later in the box.
Boards flatten row-major, top-left first, with (width − 1) hashes between rows — so a 3×3 box is three cells, ##, three cells, ##, three cells. An empty cell is a full stop. You want each occurrence that has a copy after it, which is why a digit appearing three times comes out twice. Finding the clash is easy; not consuming the rest of the box while you look is the challenge.
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.
→ []123##456##789a legal box
→ ["1"]123##451##789→ ["2", "3"]123##423##789→ ["1", "1"]111##...##...three of a kind, two of them repeat
→ []1.3##.5.##7.9
+ 8 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.