I have a MySQL table contains a list of UK address, I was trying to get the list of address doesn't have a postcode.
I the list, we can see some of them don't have postcode at the end.
I was written a query as follows and didn't get the expected result.
select * from property_address WHERE property_address
REGEXP '^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$'
How to fix this query get working?