[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
> "Robin Cornelius" <robin.cornelius@xxxxxxxxx> wrote: > > Time for a shameless plug... > > > > Don't forget the members map http://www.dclug.org.uk/linux_adm/map.php > > One note on that - I've tweaked the script so that if geocoding fails, > invalid values are not passed into the database. That should stop the > map defaulting to somewhere in the Sahara. However, I suspect that this > only happens when people use incomplete or invalid postcodes. If anyone > gets a geocode error, try ensuring you pass a valid and complete > postcode conforming to the expected format: > > [A-Z]?[A-Z][0-9]+\s[0-9][A-Z][A-Z] > > (all capitals, one or two letter prefix, one digit, one space, one > digit, two character suffix). <nerdiness> Hmm. I did a postcode regex a few years ago, and it was: [A-Z][A-Z]?(\d\d?|\d[A-Z])\s\d\d?[A-Z][A-Z] I know the Queen is unlikely to be a member of DCLUG, but she lives at SW1A 1AA. I'm not sure why I added the 1 or 2 digit bit in the second half. I can't find any examples of two digits occurring here. I pasted the attached image into my notes at the time, but I didn't make a note of where I found it. Single char postcode areas are limited (Manchester, WNES for London, and a few others) so don't really need [A-Z]. D </nerdiness>
-- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html