Postcode Grouping Regular Expression for Royal Mail Line Listing Reports

There are many regex postcode validators out there, some good, some not so great, but few cover splitting the postcode into it’s 4 elements in order to use and process this data. In my case I have created this regular expression to develop an in-house sorting office for Royal Mail’s line listing reports. The following [...]