Test, validate and match regular expressions
Matches UK postcodes such as 'SW1A 1AA' or 'M1 1AE', following official letter exclusion rules: Q/V/X are rejected as the first area letter, I/J/Z as the optional second letter, and C/I/K/M/O/V in the final two unit characters. It supports one- or two-digit districts, an optional sub-district letter, optional surrounding whitespace, and case-insensitive multiline matching. Useful for validating or extracting UK postcodes from forms and address data.