I have an access database and within it I have a table that contains a memo field with multiple lines of text. This is used to store an address. I need to use regular expressions to find the postcode within that memo field (on whatever line it may be) and then put it into a new column.
This needs to be used in a select query to return a set of results accordingly.
Any help appreciated.
UPDATE: Sample Data
[Address Memo Column]:
10 The Street
A Town
A County
DE14 1DJ
I would need this to be split out into
[Address Memo column]:
10 The Street
A Town
A County
[PostCode column]:
DE14 1DJ
UPDATE:
The below should find the Postcode value but I dont know how to apply it to the Select statement and in addition split out the value into the new field once it finds the postcode.
([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)
UPDATE: Further info
The postcode is not always the final line in the memo fields as per below
[Address Memo Column]:
10 The Street
A Town
DE14 1DJ
Tel: 01234567891
11 The Street
DE14 1DJ
Tel: 01234567891
abcdefg
11 The Street
DE3 1DJ
Tel: 01234567891
abcdefg