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 #182660 is a reply to message #182657] Sun, 25 August 2013 14:31 Go to previous messageGo to previous message
Doug Miller is currently offline  Doug Miller
Messages: 171
Registered: August 2011
Karma:
Senior Member
Curtis Dyer <dyer85(at)gmail(dot)com> wrote in news:kva1hr$rc0$1(at)dont-email(dot)me:

> Perhaps you might also keep invalid postal codes in an array to look
> up before utilizing the regular expression.

What happens when new postal codes are added?

Perhaps one might simply send a request to the USPS address validation API to find out if it's
a valid zip code or not. Use the "City-State Lookup" tool described here:

https://www.usps.com/business/web-tools-apis/address-information.htm

I don't know if Canada Post has similar tools.
[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: Thu Nov 28 17:18:20 GMT 2024

Total time taken to generate the page: 0.04634 seconds