Test, validate and match regular expressions
Validates UK postcodes case-insensitively, including the special GIR 0AA code, with optional whitespace between the outward code (formats like M1, CR2, DN55, W1A, EC1A) and the inward code (one digit followed by two letters). With gm flags, it scans each line of a multiline string. Typically used for address form validation or extracting postcodes from text, though note the anchors bind only to separate alternation branches.