You are here: Re: Need world zip codes « All PHP « IT news, forums, messages
Re: Need world zip codes

Posted by nemo on 11/30/06 11:52

On Wed, 29 Nov 2006 23:05:49 +0000, Toby Inkster
<usenet200611@tobyinkster.co.uk> wrote:

>nemo wrote:
>
>> Any chance of your divulging the expression to check for the validity
>> of format of UK postcodes, please?
>
>I did post the entire source code earlier, but if you'd like an all-in-one
>regexp, then you could do a lot worse than...
>
>/([A-PR-UWYZ][A-HK-Y]?([0-9]{1,2}|[1-9][A-HJKMNPR-Y])\s+[0-9][ABDEFGHJLN
>P-UW-Z]{2})|(BFPO\s+(c..?o\s+)?([0-9]{1,4}))|(GIR\s+0AA)|(SAN\s+TA1)|((
>(ASCN)|(BBND)|(BIQQ)|(FIQQ)|(PCRN)|(SIQQ)|(STHL)|(TDCU)|(TKCA))\s+1ZZ)/
>
>You'll need to remove the line breaks -- this regexp should contain no
>white space. Note that this allows any amount of white space between
>outgoing and incoming parts of the postcode (e.g. 'AB10 1AB' and
>'AB10 1AB' both pass the test. It's a fairly trivial matter to collapse
>that down if required.
>
>This is untested, but compiled from several that I do use.

Thank you.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация