Test, validate and match regular expressions
Matches a number followed by ordinal-style suffix letters (combinations of s, t, n, d, h) plus whitespace, but only when the word 'district' immediately follows. The positive lookahead verifies 'district' without consuming it, so the match ends after the whitespace. Commonly used to extract numbered district references like '5th district' or '22nd district' from text. Note that 'rd' (as in 3rd) won't match since 'r' is missing from the character class. The g/m flags find all matches across multiple lines.