Brand new for regex and trouble matching.
I have the following line:
AGM will be held at the Company's registered office in Unity House, Telford Road, Basingstoke, Hampshire, RG21 6YJ on January 13, 2016 at 10.00.
The company announces that its 2016 annual general meeting will be held on February 11, 2016 at 10.00 in Hangar 89, London, Luton Airport, Luton, Bedfordshire, LU2 9PF.
I am trying to extract the address from the last occurrence of 'at' to the zip code. Thus, Unity House, Telford Road, Basingstoke, Hampshire, RG21 6YJ and Hangar 89, London Luton Airport, Luton, Bedfordshire, LU2 9PF
This is what I use (at)(?!.*at)(.*)\s([A-Z]{1,2}[0-9][A-Z0-9]? [0-9][ABD-HJLNP-UW-Z]{2})
it only retrieves the second address. Any thoughts?
thanks
source
share