Incorrect postal code regex for GBR

Post Reply
gtb
Posts: 102
Joined: Thu Oct 02, 2014 2:07 pm

Incorrect postal code regex for GBR

Post by gtb »

The postal code regex for GBR is incorrect. It should be something of the form: [A-Z]{1,2}[0-9][A-Z0-9]?

rkulagow
SD Staff
Posts: 924
Joined: Tue Aug 14, 2007 3:15 pm

Re: Incorrect postal code regex for GBR

Post by rkulagow »

If the consensus is that the regex should be updated, then I'll update the code.

Anyone else want to weigh-in?

gtb
Posts: 102
Joined: Thu Oct 02, 2014 2:07 pm

Re: Incorrect postal code regex for GBR

Post by gtb »

rkulagow wrote:
Tue Apr 21, 2020 7:33 am
If the consensus is that the regex should be updated, then I'll update the code.

Anyone else want to weigh-in?
I'll note that the full regex for GBR postal codes is more extended/complicated (sort of like the US with zip+4 but with variable lengths and characters and numbers), but the real question is what regex works for the postal codes you have in the database. The proposed regex seemed to work for a few random GBR postal codes I know, but I do not have visibility into your full source list.

Also I can't seem to get any FRA postal codes to work for a selection regardless of whether it validates to the regex, but I have even less visitility into FRA postal codes.

Given I rarely try using non-US postal codes (except for testing), I have not done any extensive testing to know if these are country specific issues, or a more general issue with the regex's provided.

So, I guess the real question is does Schedules Direct have a method to use its regex to determine if it works with the postal codes it has to identify anomalies?

Post Reply