Test, validate and match regular expressions
This regular expression matches UK postcodes, capturing both the outward code (1-2 letters and 1-2 digits) and the inward code (1 digit and 2 letters). It requires exactly one space between the two parts and allows for an optional asterisk before the inward code. This pattern is highly useful for validating, parsing, or extracting standard UK postal codes in text or forms.