Rook Check
Does a white rook attack the black king along a rank or a file? Any piece standing between them blocks it.
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. This is the first one where the squares in between matter. Along a rank the rook and king sit in the same row, so every character between them has to be an empty square — and the # padding conveniently makes it impossible to run off the end of a rank by accident. Down a file they are some multiple of 15 apart, and only every fifteenth character has to be empty. The rook may be on either side of the king.
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..R..#######........#######........#######........#######........along the rank, clear
must match........#######........#######.R....k.#######........#######........#######........#######........#######........along the rank from the left
must match........#######....k...#######........#######........#######........#######....R...#######........#######........down the file, clear
must not match........#######........#######........#######..k.B.R.#######........#######........#######........#######........a bishop is in the way
must not match........#######....k...#######........#######....P...#######........#######....R...#######........#######........a pawn blocks the file
must not match........#######........#######..k.....#######........#######....R...#######........#######........#######........a diagonal is not a rook line
+ 6 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.