FEN Shape
Validate the short two-field FEN: eight ranks separated by slashes, then a space and the active colour.
A rank is one or more of the piece letters — p n b r q k for black, P N B R Q K for white — and the digits 1 to 8, which stand for runs of empty squares. Exactly eight ranks, so exactly seven slashes, then one space and either w or b, and nothing else at all: the full six-field FEN is a different string and must be rejected. Do not try to check that each rank adds up to eight squares. That is arithmetic, and a regular expression cannot count.
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR wmust matchthe starting position
8/8/8/8/8/8/8/8 bmust matchan empty board is still well formed
r1bqkb1r/pppp1ppp/2n2n2/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R wmust matchrnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP wmust not matchonly seven ranks
rnbqkbnr/pppppppp/8/8/8/8/8/PPPPPPPP/RNBQKBNR wmust not matchnine ranks
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNRmust not matchno active colour
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR xmust not matchx is not a colour
rnbqkbnr/ppppXppp/8/8/8/8/PPPPPPPP/RNBQKBNR wmust not matchX is not a piece
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1must not matchthe six-field form is not this
+ 13 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.