FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Zip Codes ctype? Pregmatch?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Zip Codes ctype? Pregmatch? [message #182655 is a reply to message #182653] Thu, 22 August 2013 22:22 Go to previous messageGo to previous message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma:
Senior Member
<QUOTE>
[snip]

> One slight correction: the Canadian valid letters are:
> abc e gh jklmn p rst vxy .

The second and third letters may also contain [WZ]

https://maps.google.com/maps?q=B0W+1H0

https://maps.google.com/maps?q=A1W+4Z1

The pattern you posted in: Message-ID: <kv11lq$8eb$1(at)speranza(dot)aioe(dot)org>

[url]
https://groups.google.com/d/msg/comp.lang.php/D-OKMe-iZa4/ARnTsmDHSdIJ
[/url]

"^([ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ])" .
"\ {0,1}(\d[ABCEGHJKLMNPRSTVWXYZ]\d)$"

seem to work as it is.
</QUOTE>

Thanks for that, but this is a perfect example of an API use instead of
other methods of checking postal code validity. I haven't mentioned a
few things because I didn't want to become involved in a long session of
e-mail about their postal codes.
There is a lot of confusion in all these areas in Canada, not the
least of them being the law-suit over the "list" copyright being
violated so much. I pretty much at this time consider Canada Post to be
the "bible" for information, as loose and lacking as their information
is. It's pretty clear why the general concensus is to use A-Za-z for the
alpha part of the codes.
For instance, in a few pages on their site, it says "New Postal
Codes are added every month." but nowhere is there any information on
what's been added or where either.
And, a lot of postal zones have created their OWN postal codes,
without the blessing of Canada Post, and they work just fine because
that particular area is known to that office and thus delivers to it.
They're even trying to trade-mark "Canada Post" according to more than a
couple sources, meaning no one carrying their "list", meaning those
carrying their "lists" couldn't say that's where the codes originated.
Lot of miscellaneous wrong-headedness is going on too but I have to
draw the line and be realistic.
That I can find the post doesn't evein indicate the need for the
space in the postal code. Looking at their images sure isn't definitive,
at their website, that is. And at one time it started to be a dash, then
reverted to a space again, and so on.

This is probably the last I'll have to say on this subject. suffice it
to say I settled on all letters and all digits with a space in the middle.

Regards,

Twayne`
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Where's the error?
Next Topic: Xml Loading special Characters
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 00:39:13 GMT 2024

Total time taken to generate the page: 0.13211 seconds