Build, test, and debug regular expressions
Validates UK postcodes per the official Royal Mail format, supporting both spaced (SW1A 1AA) and compact (SW1A1AA) variants. It handles the special Girobank postcode GIR 0AA and enforces position-specific letter rules, such as excluding Q and V from the first character and C, I, K, M, O, V from the final two letters of the inward code. With gmi flags, it matches postcodes case-insensitively throughout multiline text, making it ideal for address form validation, e-commerce checkout, and address data extraction.