Closed margaretli27 closed 1 year ago
Thanks for reporting this.. I have not looked deeply into international postcode formats so this seems like a reasonable approach.. I can make some updates if you can provide confirmation on the below...
Palace Gifts\Buckingham Palace\LONDON\SW1A 1AA GBR
SW1A 1AA
Guinness Factory Outlet\St James Gate\DUBLIN\D08 VF8H IRL
D08 VF8H
The final regex I have come up with is:
(?P<DE43_NAME>.+?) *\\(?P<DE43_ADDRESS>.+?) *\\(?P<DE43_SUBURB>.+?) *\\
(?P<DE43_POSTCODE>.{10})(?P<DE43_STATE>.{3})(?P<DE43_COUNTRY>\S{3})$
That looks reasonable to me!
Great. I'll release an update with this change over the weekend.
Updated in a1cbf0ee and released as v0.6.1.
Wonderful, thanks!
The DE43 regex makes an assumption about the DE43_POSTCODE field, that it will always be 4-10 contiguous non-whitespace characters. However, not all postal codes particularly for non-US locations adhere to that. For instance, British postal codes can contain a space partway through, which causes the regex match to fail. And Irish postal codes are three characters. I propose updating the default regex to be
For reference, the current regex is