Knight Check
Does a white knight attack the black king? Eight fixed jumps, and nothing can block a knight.
The whole board is one line. Squares run row-major from the top-left, an empty one is a dot, and between rows sit seven # — one fewer than the board is wide — so a diagonal or a knight jump that runs off the side lands on padding instead of wrapping onto the next rank. The black king is k; white pieces are uppercase P N B R Q K. The first row is rank 8, so white advances towards the start of the string. One square right is +1 and one square down is +15; every other offset you need is built from those two. A knight moves two squares one way and one the other, which in this encoding is four distances — each of them usable in either direction, because the knight may sit before or after the king in the string. Work the numbers out from +1 and +15 rather than guessing.
Wrapped into rows of 8 so you can see the board. The string itself is one line with no line breaks in it — the 7 # between rows are ordinary characters, and a dot will happily match straight past them.
must match........#######........#######....k...#######..N.....#######........#######........#######........#######........one row down, two files left
must match........#######........#######........#######..N.....#######....k...#######........#######........#######........one row up, two files left
must match........#######..k.....#######........#######...N....#######........#######........#######........#######........two rows down, one file right
must not match........#######........#######....k...#######.....N..#######........#######........#######........#######........diagonally adjacent is not a knight move
must not match........#######........#######....k...#######........#######....N...#######........#######........#######........two rows straight down is not either
must not matchk.......#######........#######........#######........#######........#######........#######........#######.......Nnowhere near
+ 7 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.