You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**Differences**| Our pattern requires exactly 2-3 letters; Google requires exactly 3. Google accepts 2-4 digits like us. GeoNames requires strict 3+4. |
273
-
|**Verdict**|**Google confirms variable digit count** (2-4 digits), validating our flexible approach. The examples show both 2-digit (NXR 01) and 4-digit (VCT 1753) formats in active use. |
|**Differences**| Our pattern accepts 2-3 letters; Google requires exactly 3. Both accept 2-4 digits. GeoNames requires strict 3+4. All sources make the space optional; we also accept dash or no separator. |
273
+
|**Verdict**|**Google confirms variable digit count** (2-4 digits) and optional space, validating our flexible approach. The examples show both 2-digit (NXR 01) and 4-digit (VCT 1753) formats in active use. Real-world data includes codes without any separator (e.g. `MST1000`). |
274
274
275
275
### NL -- Netherlands
276
276
@@ -386,7 +386,7 @@ Comparison of PostalCode2NUTS regex patterns against five authoritative referenc
386
386
|**All 34**| Accepts country-code prefixes with flexible separators (space, dash, en-dash, em-dash, period) | Real-world data includes prefixed codes (A-1010, D 10115, LT - 44327). OSM confirms codes are stored without prefix, but input data often includes them. |
387
387
|**EL**| Accepts both NN NNN and NNN NN space positions | Wikipedia says NNN NN, but real data has both. GeoNames doesn't accept space at all. Google accepts NNN NN with optional space. |
388
388
|**LU**| Accepts LU- prefix in addition to L- | GeoNames only accepts L-. Wikipedia, Google, and OSM document L- as the standard prefix. |
389
-
|**MT**| Accepts 2-3 lettersand 2-4 digits | Wikipedia and GeoNames document AAA NNNN. Google confirms 2-4 digit variability. |
389
+
|**MT**| Accepts 2-3 letters, optional separator (space/dash/none), and 2-4 digits | Wikipedia and GeoNames document AAA NNNN. Google confirms 2-4 digit variability and optional space. |
390
390
|**PL**| Dash is optional | All four external sources show NN-NNN with mandatory dash. Data often submitted without dash. |
391
391
|**PT**| Dash is optional | All four external sources show NNNN-NNN with mandatory dash. Data often submitted without dash. |
392
392
|**SE**| Space is optional | Wikipedia and GeoNames show NNN NN. Google also makes space optional, confirming our approach. |
@@ -492,7 +492,7 @@ Postal code country prefixes originate from the CEPT recommendation (1960s) to u
492
492
3.**Google i18n validates several of our design choices:**
493
493
-**EL (Greece):** Google's `\d{3} ?\d{2}` confirms space-optional format, proving GeoNames' no-space regex is a bug.
494
494
-**SE (Sweden):** Google's space-optional pattern matches ours; GeoNames' mandatory space is too strict.
495
-
-**MT (Malta):** Google accepts 2-4 digits, confirming our variable-length approach.
495
+
-**MT (Malta):** Google accepts 2-4 digits with optional space, confirming our variable-length and optional-separator approach.
496
496
-**FI, HR, LI, LT, LU, SE, SI:** Google's `postprefix` metadata confirms official postal prefixes we already handle.
497
497
498
498
4.**GeoNames has several bugs** in its published regex patterns (Greece space handling, Ireland missing anchor, Poland/Sweden mandatory separators) that would reject valid real-world input. Wikipedia, Google, and OSM documentation confirms our patterns are correct where they differ from GeoNames.
0 commit comments