Test, validate and match regular expressions
Validates full UK postcodes, matching standard formats: an outward code (letter excluding QVX plus digit/letter combinations) followed by an optional space and an inward code (digit + two letters). Also covers special cases including GIR 0AA (Girobank), SAN TA1, BFPO forces addresses, and British Overseas Territories postcodes ending in 1ZZ (ASCN, FIQQ, SHHL, TKCA, etc.). Handles both upper and lower case input via mixed-case character classes, making it ideal for address form validation and data cleansing.