Test, validate and match regular expressions
Matches simplified UK postcodes consisting of an outward code (3-4 alphanumeric characters), a single space, and an inward code (exactly 3 alphanumeric characters), e.g. 'SW1A 1AA' or 'M1 1AE'. With global and multiline flags, it extracts all postcode occurrences from addresses or multi-line text. Note it is a loose pattern—it accepts digit-only groups and doesn't enforce full UK postcode rules, so strict validation may be needed.