|
Posted by Dylan Parry on 11/29/06 15:47
nemo@nemo_spam.com wrote:
>> /^[A-Z]{1,2}[1-9][0-9]? [0-9][A-Z]{2}$/
>>
> I think that would fall foul of, say, Central London postcodes - many
> years ago, I lived at London WC1B 4BB
Thanks! I did say it was untested :) Anyway, a quick fix would produce:
/^[A-Z]{1,2}[1-9][0-9A-Z]? [0-9][A-Z]{2}$/
Which would then allow a letter /or/ a number as the last character in
the first half of the postcode, but only if it's following a digit. That
should work now, I think.
--
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]
|