Reply to Re: Need world zip codes

Your name:

Reply:


Posted by Dylan Parry on 11/29/06 12:16

nemo@nemo_spam.com wrote:

> Any chance of your divulging the expression to check for the validity
> of format of UK postcodes, please?

I would maybe use something like:

/^[A-Z]{1,2}[1-9][0-9]? [0-9][A-Z]{2}$/

Although, I haven't tested it in the slightest, but basically it should
read something like: One or two uppercase letters, followed by a digit
between 1 and 9 and, optionally, another digit between 0 and 9. Then,
after a space, a single digit between 0 and 9, followed by two uppercase
letters. It doesn't take into account more complicated issues such as
whether that postcode is real though.

I'd be interested to see what Toby came up with :)

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.

[Back to original 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

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