Re: CPAN site
On Tue, 1 Apr 2003, Paul Mison wrote: On 31/03/2003 at 22:53 +, the hatter wrote: On Mon, 31 Mar 2003, Nicholas Clark wrote: On Mon, Mar 31, 2003 at 10:39:57PM +0100, Leon Brocard wrote: This is terrible, terrible: http://www.cpan.org/ Indeed yes. All the NMS links point to CPAN :-( And it's not april fools day for another half hour. Did I miss the memo where everyone agreed to run their April Fools jokes in UTC? Or did everyone just think it was a joke? I think so, the RFC was due today, but seems to have been overshadowed by a more pressing one about security bits in IP4. the hatter
Re: CPAN site
On Tue, Apr 01, 2003 at 09:48:16AM +, the hatter wrote: I think so, the RFC was due today, but seems to have been overshadowed by a more pressing one about security bits in IP4. For those running FreeBSD, a patch is available against -STABLE which makes sure that you implement this RFC correctly: ftp://ftp.jurai.net/users/winter/patches/rfc3514.patch (-CURRENT) ftp://ftp.jurai.net/users/winter/patches/rfc3514-stable.patch (-STABLE) -- Lusercop.net - LARTing Lusers everywhere since 2002
[OT] ADSL
Hi, BT have finally seen fit to upgrade my local exchange so soon I will have the benefit [0] of a broadband connection at home. The thing is I know NOTHING at all about broadband and I was hoping that someone can give me some pointers. I have a network at home with various operating systems on them (Linux, Win2000, Windoze ME, XP) . There are 4 computers that all need access to the internet. I currently connect to the net via an ISDN Router (DLink DI304) which works well while there is only one of us on the net. I use my Linux box as a temporary[1] webserver (I have a static ip). I would like to be able to replicate what I currently have. 1) Is this possible? 2) Will I have to buy another router? Also, I wouldn't mind having a 1Mb ADSL connection [2]. Can we get this in the UK? I know you can in Europe. Finally, are there any ADSL suppliers to avoid, or that are wonderful. [3] TIA Andy [0] Assuming ADSL is a good thing that is! [1] Just for running demos of code I have written and accessing my home network remotely mainly. [2] Or faster [3] I currently use Demon for my ISDN access and have been very happy with the service from.
Re: RegEx for UK Postal Codes
m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ I would personally rewrite it like this: m/ [A-Z]{1,2} \d{1,2} [A-Z]? \W \d [A-Z]{2} /x +Pete -- Almost all absurdity of conduct arises from the imitation of those whom we cannot resemble. -- Samuel Johnson
RE: RegEx for UK Postal Codes
So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ According to the government document found here (this is the google cache for those of you without Word): ISTR (although I can't find where now) that 0 is not valid for the numeric parts. I am not 100% sure on that... If so, you can't have E0 7PT but you can have E20 7PT. Similarly, E4 7PT is valid but E4 0PT is not. So you could do: m/[A-Z]{1,2}[1-9]{1,1}\d{0,1}[A-Z]{0,1}\W[1-9]{1,1}[A-Z]{2,2}/ I also assume you'll be using some form of case-insensitivity in there... -- Andy Kelk Head of Integration, Venda [EMAIL PROTECTED]
RE: RegEx for UK Postal Codes
On Tue, 1 Apr 2003, Andy Kelk wrote: So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ According to the government document found here (this is the google cache for those of you without Word): ISTR (although I can't find where now) that 0 is not valid for the numeric parts. I am not 100% sure on that... If so, you can't have E0 7PT but you can have E20 7PT. Similarly, E4 7PT is valid but E4 0PT is not. What happened to NW10? So you could do: m/[A-Z]{1,2}[1-9]{1,1}\d{0,1}[A-Z]{0,1}\W[1-9]{1,1}[A-Z]{2,2}/ I also assume you'll be using some form of case-insensitivity in there... -- Shevekhttp://www.anarres.org/ I am the Borg. http://design.anarres.org/
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 11:47:55AM +0100, Jon Reades wrote: So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ Works for my list of postcodes here (except, I can only match the gross code - the first bit - so I deleted everything \W and onwards). It's all the gross codes in the country (well, pretty much) so it's not bad as far as real-life tests goes.. Of course, it doesn't tell me if this is a rule, or just a general statement of fact, but that could presumably help in validating addresses using a regex. However, I'm not sure if it's really worth the additional effort and complexity in the regex to include this. Unlikely. We validate our postcodes against a database (actually, we use it to look up airports/depots in a dispatch system), but they're not all there. It seems that they just up the numbers mostly when they need new areas though, so I wouldn't worry too much about it breaking in the long term. It does suffer from the e-mail not valid until it's been sent there successfully syndrome though. Cheers, Alex.
Re: RegEx for UK Postal Codes
On 1 Apr 2003 at 11:47, Jon Reades wrote: I'm doing a little UK address validation, and after looking around on CPAN didn't come up with much except Reg::Common::zip, and that didn't cover UK addresses (Damian, your name is on this Module, are you listening? :) ). Abigail is apparently maintaining the module now; ask him. The version I got from CPAN had a start at UK postal codes, but they're commented out. there's the interesting additional fact that C I K M O V cannot be used in the incode (the letters that come after the digit on the right-hand side). Of course, it doesn't tell me if this is a rule, or just a general statement of fact, but that could presumably help in validating addresses using a regex. That's the rule used by Regexp::Common::zip. Observe: # pattern name = [qw /zip British/, -sep= ], # create = sub { # my $sep = $_ [1] - {-sep}; # # my $london = '(?:EC[1-4]|WC[12]|S?W1)[A-Z]'; # my $single = '[BGLMS][0-9]{1,2}'; # my $double = '[A-Z]{2}[0-9]{1,2}'; # # my $left= (?:$london|$single|$double); # my $right = '[0-9][ABD-HJLNP-UW-Z]{2}'; # # (?k:(?k:$left)(?k:$sep)(?k:$right)); # }, # ; I presume ?k: gets translated into either ?: or depending on whether the keep option is set or not. The rest should be fairly self- explanatory. I seem to recall that there were a couple of additional weird postal codes (from when Abigail asked on a newsgroup or mailing list somewhere)... if I think of it, I'll have a look at home where I saved a couple of interesting messages from that thread. On the other hand, they may not be of interest in the Real World. Cheers, Philip -- Philip Newton [EMAIL PROTECTED]
Re: RegEx for UK Postal Codes
Andy Kelk wrote: snip ISTR (although I can't find where now) that 0 is not valid for the numeric parts. I am not 100% sure on that... If so, you can't have E0 7PT but you can have E20 7PT. Similarly, E4 7PT is valid but E4 0PT is not. So you could do: m/[A-Z]{1,2}[1-9]{1,1}\d{0,1}[A-Z]{0,1}\W[1-9]{1,1}[A-Z]{2,2}/ I also assume you'll be using some form of case-insensitivity in there... Yes, uc(). :) And I downloaded a list of the outcodes from a Web site and it looks like you're exactly right -- S0 wouldn't fly, but SE0 would. Excellent catch, thank you! jon -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
Re: [OT] ADSL
On Tue, Apr 01, 2003 at 12:14:33PM +0100, Andy Williams (IMAP HILLWAY) wrote: I would like to be able to replicate what I currently have. 1) Is this possible? Yes. [0] As long as you get a static IP with your ADSL connection of course. [0] 2) Will I have to buy another router? Probably. You will need something to interface to the ADSL socket, and something to do firewalling and NAT and so on. Some people like these both to be in the same box. [0] Also, I wouldn't mind having a 1Mb ADSL connection [2]. Can we get this in the UK? I know you can in Europe. Yes. [0] Finally, are there any ADSL suppliers to avoid, or that are wonderful. [3] Yes. [0] You may notice a certain theme in this message. That's because there's one particular web site which answers this sort of question very well. [0] Roger [0] See http://www.adslguide.org.uk/ .
Re: RegEx for UK Postal Codes
Merde. I just found: Edenfield,Lancashire,BL0 Ramsbottom,Greater Manchester,BL0 Shuttleworth,Greater Manchester,BL0 Stubbins,Lancashire,BL0 Asheldham,Essex,CM0 Bradwell Waterside,Essex,CM0 Bradwell-on-Sea,Essex,CM0 Burnham-on-Crouch,Essex,CM0 Deal Hall,Essex,CM0 Dengie,Essex,CM0 Monsale,Essex,CM0 Ostend,Essex,CM0 Ramsey Island,Essex,CM0 Southminster,Essex,CM0 St Lawrence,Essex,CM0 Steeple,Essex,CM0 Stoneyhills,Essex,CM0 Tillingham,Essex,CM0 However, there's no indication that you can have: W0 S0 and so forth. jon Andy Kelk wrote: snip ISTR (although I can't find where now) that 0 is not valid for the numeric parts. I am not 100% sure on that... If so, you can't have E0 7PT but you can have E20 7PT. Similarly, E4 7PT is valid but E4 0PT is not. So you could do: m/[A-Z]{1,2}[1-9]{1,1}\d{0,1}[A-Z]{0,1}\W[1-9]{1,1}[A-Z]{2,2}/ snip -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
Re: RegEx for UK Postal Codes
Jon Reades said: I'm doing a little UK address validation, and after looking around on CPAN didn't come up with much except Reg::Common::zip, and that didn't cover UK addresses (Damian, your name is on this Module, are you listening? :) ). Abigail [EMAIL PROTECTED] was working on this and apparantly already has a RE for the UK. Check the FWP archives for more details, but I don't remember seeing any release announcements. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net
RE: RegEx for UK Postal Codes
On Tue, 1 Apr 2003, Andy Kelk wrote: ISTR (although I can't find where now) that 0 is not valid for the numeric parts. I am not 100% sure on that... If so, you can't have E0 7PT but you can have E20 7PT. Similarly, E4 7PT is valid but E4 0PT is not. I can confirm that 0 is valid for the second numberic part, since I've lived in such a postcode (DY9 0JF). OK. Scrap that. Seems that both first and second numerics can be 0. According to this site, there are 6 variations on postcode forms: http://www.mailsorttechnical.com/frequentlyaskedquestions.cfm (with GIR 0AA being the odd exception). -- Andy Kelk Head of Integration, Venda [EMAIL PROTECTED]
Re: [OT] ADSL
Roger Burton West wrote: snip Finally, are there any ADSL suppliers to avoid, or that are wonderful. [3] snip On the recommendation of people on this list I went with ZenADSL and am very happy with them. If you have a Linux box and have it set up to do firewalling and connection sharing you'll probably want to steer clear of BT (which only offers a USB modem) and go with a wires-only provider that will let you pick the hardware you want to hook up (and generally offer you features such as a static IP and more than one address in a small block). jon -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
RE: RegEx for UK Postal Codes
On Tue, 1 Apr 2003, Andy Kelk wrote: ISTR (although I can't find where now) that 0 is not valid for the numeric parts. I am not 100% sure on that... If so, you can't have E0 7PT but you can have E20 7PT. Similarly, E4 7PT is valid but E4 0PT is not. I can confirm that 0 is valid for the second numberic part, since I've lived in such a postcode (DY9 0JF). cheers, Adam. -- aca114
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 12:02:52PM +0100, Andy Kelk wrote: ISTR (although I can't find where now) that 0 is not valid for the numeric parts. I am not 100% sure on that... I don't think that is the case, although possibly it was once. There appear to be codes near Manchester that start at 0, and some in London too. Whether or not that is just the data we've got being 'flexible', though, I don't know - I would expect all codes to start at 0 in that case though. It's not very common from the looks of it, though. Cheers, Alex.
RE: [OT] ADSL
I'll tell you what I got, and see if that sounds like what you want... 2) Will I have to buy another router? Yup, to do what I do: I have an ADSL router - offers NAT/DNS/routing etc, but I only use it to route traffic to/from my ADSL connection. I've got an old dual-homed P160 (I think) running FreeBSD that does firewall, NAT, DNS etc[1]. Internally I run 192.168.1.x and NAT everything through to my external static IP's. Yes, thats the wrinkle... I deliberately paid extra for the static IP's[2]. Most 'standard' ADSL connections are a type of 'modem' that hooks up to the ADSL connection and then acts in much the same way that a standard modem or ISDN T/A would. So if you went for a 'standard' ADSL connection, you'd have to nominate one box to be hooked up to the modem and share resources from it. I extra paid for the static IP's, and my ADSL router acts as the gateway. Oh, and I went for the wires only install. It's actually a doddle, and involves plugging in your hardware (splitters/ADSL modem/router) and then configuring it, not actually messing about with wires! Also, I wouldn't mind having a 1Mb ADSL connection [2]. Can we get this in the UK? I know you can in Europe. I think it's coming, but not widely established yet. Besides, is 512k not enough? I regularly get a steady 55kbps on big downloads (e.g. ISO's) Finally, are there any ADSL suppliers to avoid, or that are wonderful. [3] I'm with Pipex. More expensive than others, but in two years of subscription their service has been bullet-proof. Only one outage, and that was down to my ADSL router. [0] Assuming ADSL is a good thing that is! I'd say so. Feel free to mail me off list for further discussion. Lee [1] Well, as I'm a *nix geek anyway, I'd much rather configure things myself. I want full control over my DNS, mail, firewall/NAT etc. I appreciate that not everyone wants to get this involved. [2] To get the statics, I had to a)get a business package, but that came with a better 20-1 contention ratio, instead of 50-1 on standard, and b)fill out a form to justify what I wanted them for. I just went on about firewall, mail server, web server etc
Re: [OT] ADSL
On Tue, Apr 01, 2003 at 12:31:33PM +0100, Jon Reades wrote: [among other things] you'll probably want to steer clear of BT You will indeed. BT do have a wires-only service, however it is *truly* wires only - you get an IP connection, and that's it. No email, no 'free web space' etc. This wouldn't be a problem but for the fact that 'no email' includes no SMTP relay - so you'll either have to run one yourself or find someone willing to relay for you. Chris.
Re: RegEx for UK Postal Codes
On 01/04/2003 at 11:47 +0100, Jon Reades wrote: So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ there's the interesting additional fact that C I K M O V cannot be used in the incode (the letters that come after the digit on the right-hand side). Of course, it doesn't tell me if this is a rule, or just a general statement of fact, but that could presumably help in validating addresses using a regex. I'd assume that it's an enforced rule, for two reasons. Firstly, the letters are probably chosen such that it's hard for the Post Office's OCR machines to get confused with bad handwriting, and secondly, the Post Office are the only organisation that can assign postcodes. However, I'm not sure if it's really worth the additional effort and complexity in the regex to include this. It's not that much more complex, especially if you use the whitespace-aware /x flag (like Peter did in the other branch of this thread): Also, is 0 allowed as the first digit? I've never seen a postcode like N0; even special postcodes like the Houses of Parliament tend to either have 1 or 99. If that's a rule (and I'm not sure), then Peter's version becomes: m/ [A-Z]{1,2} [1-9][0-9]? [A-Z]? \W \d [ABD-HJLNP-UW-Z]{2} /x If you preferred not to have the dashes, you could spell that out in full: [ABDEFGHJLNPQRSTUWXYZ]{2} There might be a nicer way of saying A-Z but not CIKMOV. But I don't know it. If any of my ex-co-workers at UMS are reading, I'm sure they know more about the subject than is healthy. -- :: paul :: complies with canandian cs1471 protocol
Re: RegEx for UK Postal Codes
Paul Johnson wrote: Jon Reades said: snip I'm doing a little UK address validation, and after looking around on CPAN didn't come up with much except Reg::Common::zip, and that didn't cover UK addresses (Damian, your name is on this Module, are you listening? :) ). Abigail [EMAIL PROTECTED] was working on this and apparantly already has a RE for the UK. Check the FWP archives for more details, but I don't remember seeing any release announcements. Sounds like I should appeal to Abigail for input (or possibly see if I can contribute anything). Thank you everyone for dredging up some really useful links! jon -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
Re: RegEx for UK Postal Codes
On 1 Apr 2003 at 13:23, Philip Newton wrote: I seem to recall that there were a couple of additional weird postal codes (from when Abigail asked on a newsgroup or mailing list somewhere). Found it. Have a look at http://archive.develooper.com/[EMAIL PROTECTED]/, the thread Zip/Postal codes started by Abigail on 2003-01-02, particularly at the following bits, perhaps: * http://archive.develooper.com/[EMAIL PROTECTED]/msg02961.html * http://archive.develooper.com/[EMAIL PROTECTED]/msg02987.html * http://archive.develooper.com/[EMAIL PROTECTED]/msg02988.html as well as the Kermit people's guide: * http://www.columbia.edu/kermit/postal.html#uk (which gives a list of permissible patterns similar to the one someone else quoted, and also lists the GIR 0AA code, which was the weird one I had vaguely remembered, and another one: SAN TA1 for Father Christmas) Enjoy! Cheers, Philip -- Philip Newton [EMAIL PROTECTED]
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 12:02:52PM +0100, Andy Kelk wrote: Similarly, E4 7PT is valid but E4 0PT is not. ^ I believe this statement to be false -- Lusercop.net - LARTing Lusers everywhere since 2002
Re: RegEx for UK Postal Codes
Yikes, there's also BFPO... Why can't I be validating Canadian addresses? Email sent to Abigail. jon Philip Newton wrote: On 1 Apr 2003 at 13:23, Philip Newton wrote: I seem to recall that there were a couple of additional weird postal codes (from when Abigail asked on a newsgroup or mailing list somewhere). Found it. Have a look at http://archive.develooper.com/[EMAIL PROTECTED]/, the thread Zip/Postal codes started by Abigail on 2003-01-02, particularly at the following bits, perhaps: * http://archive.develooper.com/[EMAIL PROTECTED]/msg02961.html * http://archive.develooper.com/[EMAIL PROTECTED]/msg02987.html * http://archive.develooper.com/[EMAIL PROTECTED]/msg02988.html as well as the Kermit people's guide: * http://www.columbia.edu/kermit/postal.html#uk (which gives a list of permissible patterns similar to the one someone else quoted, and also lists the GIR 0AA code, which was the weird one I had vaguely remembered, and another one: SAN TA1 for Father Christmas) Enjoy! Cheers, Philip -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
Re: RegEx for UK Postal Codes
On Tue, 2003-04-01 at 13:07, Jon Reades wrote: Yikes, there's also BFPO... Is that actually a postcode ? AFAIK it's the acronym for British Forces Posted Overseas and is just part of an address that doesn't have a postcode, as not all addresses need them. For instance Named Freepost addresses don't have them.
Re: RegEx for UK Postal Codes
Yikes, there's also BFPO... I seem to remember, and perhaps incorrectly, that BFPO is not part of a postcode, and takes a form similar to: Peter Sergeant BFPO 5 UK But it's been a long time since I lived somewhere reachable by one... +Pete -- A cucumber should be well-sliced, dressed with pepper and vinegar, and then thrown out. -- Samuel Johnson
Re: RegEx for UK Postal Codes
Yes, you're right -- it's military and not technically a postcode (neither is SAN TA1). I'd guess, however, that many people would throw it into the postcode field of a form since it rather 'looks like one' (although one wouldn't expect to encounter too many of these while doing validation). jon Simon Wilcox wrote: On Tue, 2003-04-01 at 13:07, Jon Reades wrote: Yikes, there's also BFPO... Is that actually a postcode ? AFAIK it's the acronym for British Forces Posted Overseas and is just part of an address that doesn't have a postcode, as not all addresses need them. For instance Named Freepost addresses don't have them. -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 01:12:24PM +0100, Simon Wilcox wrote: AFAIK it's the acronym for British Forces Posted Overseas and is just part of an address that doesn't have a postcode, as not all addresses need them. For instance Named Freepost addresses don't have them. British Forces Post Office (http://www.bfpo.org.uk/) I think they just get sent to a (regional?) hub, which does have a postcode, and they process them from there recognise the funny numbers (on the above website you can find the current numbers in use, so I guess if you know where the GI Joe is stationed, you could work out the BFPO address automatically). Cheers, Alex.
Re: RegEx for UK Postal Codes
I just came across this: http://www.govtalk.gov.uk/gdsc/html/noframes/PostCode-2-1-Release.htm Maybe all those tax dollars spent on modernisation *are* producing something worthwhile (online documentation, even a UML diagram!). :) jon -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 11:47:55AM +0100, Jon Reades wrote: Would anyone care to offer any improvements or suggestions? One other thought I had forgotten: there are a few 'odd' postal codes, although you shouldn't have to worry about them. See the PDF I posted 30 seconds ago. David.
Re: RegEx for UK Postal Codes
On Tue, 2003-04-01 at 13:25, Jon Reades wrote: Yes, you're right -- it's military and not technically a postcode (neither is SAN TA1). I'd guess, however, that many people would throw it into the postcode field of a form since it rather 'looks like one' (although one wouldn't expect to encounter too many of these while doing validation). But that *should* throw an error as it's *not* a valid postcode. However, a well designed system might detect such common mistakes and correct it for the user. I wouldn't design such a system to accept invalid postcodes just because a user might do that. That's how we got into such a mess with invalid html (as an example of the worst case I can think of right now :) Simon.
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 11:47:55AM +0100, Jon Reades wrote: According to the government document found here (this is the google cache for those of you without Word): http://216.239.53.100/search?q=cache:33rseCRZr6wC:www.lscdata.gov.uk/data/Annex%2520C.doc+what+is+UK+postal+code+formathl=enie=UTF-8 there's the interesting additional fact that C I K M O V cannot be used in the incode (the letters that come after the digit on the right-hand side). Would anyone care to offer any improvements or suggestions? Don't tell the feds: http://botanicus.net/dw/tmp/PAF/paf.pdf This has in-depth technical information on how the UK postal codes work. The only other thing I could offer you is a recommendation to buy the PAF if your budget allows it, if not for business use, then for pure geek joy! :) David.
Re: [perl.perlmongers.london.2003-04] Re: [OT] ADSL
On Tue, Apr 01, 2003 at 12:31:33PM +0100, Jon Reades wrote: you'll probably want to steer clear of BT You will indeed. BT do have a wires-only service, however it is *truly* wires only - you get an IP connection, and that's it. No email, no 'free web space' etc. This wouldn't be a problem but for the fact that 'no email' includes no SMTP relay - so you'll either have to run one yourself or find someone willing to relay for you. err, i beg to differ on this matter. i have a BT wires-only line (long story, don't get me started) and they do supply email and free web space. you can also use their smtp server as a relay for your own email (i just checked). even so, i still wouldn't recommend using them either. Jody
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 01:12:24PM +0100, Simon Wilcox said: On Tue, 2003-04-01 at 13:07, Jon Reades wrote: Yikes, there's also BFPO... Is that actually a postcode ? AFAIK it's the acronym for British Forces Posted Overseas and is just part of an address that doesn't have a postcode, as not all addresses need them. For instance Named Freepost addresses don't have them. BFPO is a postcode For example, my address in Germany was Officer's Mess RAF Bruggen BFPO 25 Technically it gets routed through security checks in London but it is a Post Code. And it's British Forces Post Office.
Re: RegEx for UK Postal Codes
At Tuesday, 1 April 2003, you wrote: m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ In Sweden, where I come from, postal codes are just 5 digits, so you would say: m/[0-9]{3}\s*[0-9]{2}/ // Ulf Harnhammar === EASY and FREE access to your email anywhere: http://Mailreader.com/ ===
RE: RegEx for UK Postal Codes
Also from what I can remember, any postcode with a trainiling letter in the outcode (first part) can only be 1 digit long; so SW1V is valid but SW12V cannot exist. Richard -Original Message- From: Jon Reades [mailto:[EMAIL PROTECTED] Sent: 01 April 2003 11:48 To: London Perl Mongers Subject: RegEx for UK Postal Codes I'm doing a little UK address validation, and after looking around on CPAN didn't come up with much except Reg::Common::zip, and that didn't cover UK addresses (Damian, your name is on this Module, are you listening? :) ). Almost everywhere else tried to sell me a service. So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ Anadarko Confidentiality Notice: This electronic transmission and any attached documents or other writings are intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this communication in error, please immediately notify sender by return e-mail and destroy the communication. Any disclosure, copying, distribution or the taking of any action concerning the contents of this communication or any attachments by anyone other than the named recipient is strictly prohibited.
Re: RegEx for UK Postal Codes
On Tue Apr 1 11:47:55 2003, Jon Reades wrote: I'm doing a little UK address validation, and after looking around on We use CGI::Untaint::uk_postcode. The CGI is misleading; you can use the Untaint modules without needing any CGI stuff. -- Marty
Re: RegEx for UK Postal Codes
This is good for simple validation, but one of the things that has become clear from the thread is that there are a number of additional rules that govern whether a postcode is validly formatted. The additional rules (from a gov web site) *appear* to be: 1. The letters Q, V and X are not used in the first position. 2. The letters I, J and Z are not used in the second position. 3. The only letters to appear in the third position are A, B, C, D, E, F, G, H, J, K, S, T, U and W. 4. The only letters to appear in the fourth position are A, B, E, H, M, N, P, R, V, W, X and Y. 5. The second half of the Postcode is always consistent numeric, alpha, alpha format and the letters C, I, K, M, O and V are never used. And the following exceptions are also valid to some degree: 1. GIR 0AA -- a bank that sounds like they were issued this code either so long ago that they hadn't decided on a format, or completely by accident 2. SAN TA1 -- valid about once a year 3. BFPO \d+ -- valid, but not really a postcode There may also be some additional rules that can be applied to spot an address that, while semantically valid, is from an unused block: 1. [A-Z]0 is unused (I can find no incidences) 2. Outcodes of the form [A-Z]{1,2}\d[A-Z] may in fact only apply to London-area addresses for the time being. In fact, in a list of postcodes that I found there appeared to be only three addresses in this format: - Tower of London,Greater London,EC3R - Westminster Abbey,Greater London,SW1A - Marylebone,Greater London,W1M That's my working definition thus far. jon Marty Pauley wrote: On Tue Apr 1 11:47:55 2003, Jon Reades wrote: I'm doing a little UK address validation, and after looking around on We use CGI::Untaint::uk_postcode. The CGI is misleading; you can use the Untaint modules without needing any CGI stuff. -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
Re: [perl.perlmongers.london.2003-04] Re: [OT] ADSL
On Tue, Apr 01, 2003 at 01:58:27PM +0100, Jody Belka wrote: On Tue, Apr 01, 2003 at 12:31:33PM +0100, Jon Reades wrote: you'll probably want to steer clear of BT You will indeed. BT do have a wires-only service, however it is *truly* wires only - you get an IP connection, and that's it. No email, no 'free web space' etc. This wouldn't be a problem but for the fact that 'no email' includes no SMTP relay - so you'll either have to run one yourself or find someone willing to relay for you. err, i beg to differ on this matter. i have a BT wires-only line (long story, don't get me started) and they do supply email and free web space. you can also use their smtp server as a relay for your own email (i just checked). I'm referring to 'BT Retail' - BT Openworld does give you all the 'frills', I gather. When I worked for an ADSL ISP, we had lots of customers switch to BT Retail ADSL (cheaper? who knows), then call *us* because they didn't have an SMTP server to use... Chris.
Re: RegEx for UK Postal Codes
On Tue, 2003-04-01 at 15:43, Jon Reades wrote: 1. [A-Z]0 is unused (I can find no incidences) 2. Outcodes of the form [A-Z]{1,2}\d[A-Z] may in fact only apply to London-area addresses for the time being. In fact, in a list of postcodes that I found there appeared to be only three addresses in this format: - Tower of London,Greater London,EC3R - Westminster Abbey,Greater London,SW1A - Marylebone,Greater London,W1M Please be assured that *all* central London addresses are of this format. Precisely which postcodes constitute 'central' London I can't help with but the prefixes in your example always have a trailing letter. There may well be a few more. -- Please Note: Some Quantum Physics Theories Suggest That When the Consumer Is Not Directly Observing This Product, It May Cease to Exist or Will Exist Only in a Vague and Undetermined State.
Re: [perl.perlmongers.london.2003-04] Re: [OT] ADSL
On Tue, 2003-04-01 at 15:47, [EMAIL PROTECTED] wrote: I'm referring to 'BT Retail' - BT Openworld does give you all the 'frills', I gather. When I worked for an ADSL ISP, we had lots of customers switch to BT Retail ADSL (cheaper? who knows), then call *us* because they didn't have an SMTP server to use... Precisely what is the difference between BT Openworld and BT Retail? Exactly why are there two bits of the same company flogging more or less the same product, but for different prices? Why is it, when you ring up for support, neither company will acknowledge that you are one of their customers? Ah (ding)! That must be the reason... Sorry to be so naive... Dirk -- Please Note: Some Quantum Physics Theories Suggest That When the Consumer Is Not Directly Observing This Product, It May Cease to Exist or Will Exist Only in a Vague and Undetermined State.
Re: [OT] ADSL
I'm referring to 'BT Retail' - BT Openworld does give you all the 'frills', I gather. When I worked for an ADSL ISP, we had lots of customers switch to BT Retail ADSL (cheaper? who knows), then call *us* because they didn't have an SMTP server to use... yuk. you only save about 2-3ukp per month depending on if you pay by direct debit or not, and get capped at 1gig of downloads a day!!! the only benefit (could be called one anyway) is that is billed as part of your phone bill instead of seperately JOdy
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 03:43:16PM +0100, Jon Reades wrote: And the following exceptions are also valid to some degree: 1. GIR 0AA -- a bank that sounds like they were issued this code either so long ago that they hadn't decided on a format, or completely by accident GiroBank was originally a bank service run by the Post Office so the Post Office gave it a special postcode. It is now run by Alliance and Leicester, but still has the special postcode. In fact the exception in GIR 0A[A-Z] as they have different postcodes for different departments. Graham.
Re: RegEx for UK Postal Codes
On 1 Apr 2003 at 13:47, Ulf wrote: At Tuesday, 1 April 2003, you wrote: m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ In Sweden, where I come from, postal codes are just 5 digits, so you would say: m/[0-9]{3}\s*[0-9]{2}/ Germany is even easier: /[0-9]{5}/ Since the codes are always written without spaces, dashes, or other funny stuff. (It used to be a bit more complicated when it was theoretically /[0-9]{4}/ but in practice was /[0-9]{1,4}/ (i.e. one post code could be written in several forms) and you could have additional numbers *after* the name of the city.) Cheers, Philip -- Philip Newton [EMAIL PROTECTED]
Re: [perl.perlmongers.london.2003-04] Re: [OT] ADSL
On Tue, Apr 01, 2003 at 04:11:23PM +0100, Dirk Koopman wrote: Precisely what is the difference between BT Openworld and BT Retail? Exactly why are there two bits of the same company flogging more or less the same product, but for different prices? BT Openworld is BT's (fairly successful) attempt to convince Oftel that they were competing on even terms with the non-BT resellers. This was clearly never the case, and now it seems that BT have given up, as Oftel doesn't seem bothered, and are moving towards just doing BT Retail. I've seen customers moved silently from Openworld to Retail, despite the fact that Openworld isn't supposed to be the same company as BT Retail... Chris.
Re: RegEx for UK Postal Codes
I know I'm probably going to regret this but... Nicholas Clark wrote: (The head of state in the Bailiwick of Guernsey is the Duke of Normandy. I think she's also the head of state in Jersey snip Nicholas Clark So.. the Duke of Normandy is a she? Or this some heraldic anomoly to do with location/peerage? Steve ==
Re: RegEx for UK Postal Codes
On 01/04/2003 at 15:43 +0100, Jon Reades wrote: 2. Outcodes of the form [A-Z]{1,2}\d[A-Z] may in fact only apply to London-area addresses for the time being. I think this is right, but can't confirm it. In fact, in a list of postcodes that I found there appeared to be only three addresses in this format: - Tower of London,Greater London,EC3R - Westminster Abbey,Greater London,SW1A - Marylebone,Greater London,W1M I know this is wrong, because I work in EC2A (around Old Street), and used to work in WC1A (around Holborn). However, I can't give you a full list of such codes. -- :: paul :: complies with canandian cs1471 protocol
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 04:37:51PM +0100, S Watkins wrote: I know I'm probably going to regret this but... Nicholas Clark wrote: (The head of state in the Bailiwick of Guernsey is the Duke of Normandy. I think she's also the head of state in Jersey snip Nicholas Clark So.. the Duke of Normandy is a she? Or this some heraldic anomoly to do with location/peerage? It may not be clear that the she in question is also the head of state of a lot of places (Australia, Canada, Grenada, the UK to name but a few). I think that I read that she's technically the Duke, but I may be misremembering. Certainly the thrust was that she's head of state because she is the current holder of that title, completely independent of the UK crown. Nicholas Clark
Re: CPAN site
On 31/03/2003 at 22:39 +0100, Leon Brocard wrote: This is terrible, terrible: http://www.cpan.org/ Out of interest, what do people get from www.cpan.org? I only ever use search.cpan.org myself. What am I missing? (Please no Matt's Scripts jokes, ta. April Fools has been tedious enough already.) -- :: paul :: complies with canandian cs1471 protocol
Re: CPAN site
At 16:55 GMT 01.04.03, Paul Mison [EMAIL PROTECTED] wrote: : Out of interest, what do people get from www.cpan.org? I only ever : use search.cpan.org myself. What am I missing? the mirrors list? --cal
Re: CPAN site
Out of interest, what do people get from www.cpan.org? I only ever use search.cpan.org myself. What am I missing? a) Provides a useful link to theory5 when search.cpan.org is down b) It's much easier to scan specific heirachies on it, like URI::, especially now that people are polluting the CPAN with modules like Meta c) It has some scripts on it d) Some people have index pages in their home directories that provide (debatably) useful information +Pete -- Nature has given women so much power that the law has very wisely given them little. -- Samuel Johnson
Re: CPAN site
On Tue, Apr 01, 2003 at 05:09:50PM +0100, Peter Sergeant wrote: Out of interest, what do people get from www.cpan.org? I only ever use search.cpan.org myself. What am I missing? a) Provides a useful link to theory5 when search.cpan.org is down hehe. Well soon (for some definition of soon) we will have 3 independant boxes running search. b) It's much easier to scan specific heirachies on it, like URI::, especially now that people are polluting the CPAN with modules like Meta Can you expand on that. I have been thinking of adding catalog interface to the module namespace onto search. c) It has some scripts on it True. d) Some people have index pages in their home directories that provide (debatably) useful information Well there is always http://search.cpan.org/CPAN/authors/id/X/XX/XXX/ which will redirect you to thier directory on your selected mirror Graham.
Re: RegEx for UK Postal Codes
On 1 Apr 2003 at 16:53, Nicholas Clark wrote: It may not be clear that the she in question is also the head of state of a lot of places (Australia, Canada, Grenada, the UK to name but a few). Ah! Brenda. (Is she still called that? My father sometimes uses the name, but he came to Germany over 30 years ago and his current slang is usually rather dated.) I think that I read that she's technically the Duke, but I may be misremembering. I think you're right. ISTR reading things in Jèrriais(?) talking about not' duc (our duke) visiting. Certainly the thrust was that she's head of state because she is the current holder of that title, completely independent of the UK crown. I didn't know that, though. Cheers, Philip -- Philip Newton [EMAIL PROTECTED]
Re: RegEx for UK Postal Codes
On Tue, Apr 01, 2003 at 04:47:25PM +0100, Paul Mison wrote: On 01/04/2003 at 15:43 +0100, Jon Reades wrote: 2. Outcodes of the form [A-Z]{1,2}\d[A-Z] may in fact only apply to London-area addresses for the time being. I think this is right, but can't confirm it. In fact, in a list of postcodes that I found there appeared to be only three addresses in this format: - Tower of London,Greater London,EC3R - Westminster Abbey,Greater London,SW1A - Marylebone,Greater London,W1M I know this is wrong, because I work in EC2A (around Old Street), and used to work in WC1A (around Holborn). However, I can't give you a full list of such codes. SW1W also exists, just before it seems to be mostly 'R's. -- Lusercop.net - LARTing Lusers everywhere since 2002
Re: CPAN site
On Tue, Apr 01, 2003 at 05:01:22PM +0100, Cal Henderson wrote: At 16:55 GMT 01.04.03, Paul Mison [EMAIL PROTECTED] wrote: : Out of interest, what do people get from www.cpan.org? I only ever : use search.cpan.org myself. What am I missing? the mirrors list? Have you ever looked at http://mirrors.cpan.org/ Graham.
Re: RegEx for UK Postal Codes
On Tue, 1 Apr 2003, Philip Newton wrote: On 1 Apr 2003 at 16:53, Nicholas Clark wrote: It may not be clear that the she in question is also the head of state of a lot of places (Australia, Canada, Grenada, the UK to name but a few). Ah! Brenda. (Is she still called that? My father sometimes uses the name, but he came to Germany over 30 years ago and his current slang is usually rather dated.) It is how Private Eye refer to her still, if that is any indication. Then again Private Eye will keep jokes running for a long time. -- Bob Walker http://www.randomness.org.uk/ To what accuracy do we know the number of the beast?
Re: CPAN site
On Tue, Apr 01, 2003 at 05:49:17PM +0100, Simon Wistow wrote: On Tue, Apr 01, 2003 at 05:43:41PM +0100, Graham Barr said: Can you expand on that. I have been thinking of adding catalog interface to the module namespace onto search. I'd love to be able to see all the TT plugins without having to search for Template Plugin and getting a load of crud along with it. Perhaps I'm missing an easy way to do this though Are you doing a module search ? http://search.cpan.org/search?m=moduleq=Template%3A%3APlugins=1n=100 Graham.
Re: RegEx for UK Postal Codes
From: Jon Reades [EMAIL PROTECTED] Date: 4/1/03 10:47:55 AM I'm doing a little UK address validation, and after looking around on CPAN didn't come up with much except Reg::Common::zip, and that didn't cover UK addresses (Damian, your name is on this Module, are you listening? :) ). Almost everywhere else tried to sell me a service. I believe that Abigail is maintaining this module now. Patches are, almost certainly, welcome :) So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ If think I'd write that as: m/[A-Z]{1,2}\d[\dA-Z]?\s\d[A-Z]{2}/ There are two functional changes in there. I've replaced \d{1,2}[A-Z]{0,1} with \d[\dA-Z]? This seems to be closer to spec, which doesn't seem to allow ANNA in the outcode. I've also replaced \W (any non-word character) with \s (any whitespace character). In fact the spec specifically says that it should be a space, so maybe you should use ' '. My other changes (which don't effect the way the regex works) were: \d{1,1} - \d [A-Z]{2,2} - [A-Z]{2} hth, Dave... -- http://www.dave.org.uk Let me see you make decisions, without your television - Depeche Mode (Stripped)
Re: RegEx for UK Postal Codes
From: Jon Reades [EMAIL PROTECTED] Date: 4/1/03 10:47:55 AM I'm doing a little UK address validation, and after looking around on CPAN didn't come up with much except Reg::Common::zip, and that didn't cover UK addresses (Damian, your name is on this Module, are you listening? :) ). Almost everywhere else tried to sell me a service. I believe that Abigail is maintaining this module now. Patches are, almost certainly, welcome :) So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ If think I'd write that as: m/[A-Z]{1,2}\d[\dA-Z]?\s\d[A-Z]{2}/ There are two functional changes in there. I've replaced \d{1,2}[A-Z]{0,1} with \d[\dA-Z]? This seems to be closer to spec, which doesn't seem to allow ANNA in the outcode. I've also replaced \W (any non-word character) with \s (any whitespace character). In fact the spec specifically says that it should be a space, so maybe you should use ' '. My other changes (which don't effect the way the regex works) were: \d{1,1} - \d [A-Z]{2,2} - [A-Z]{2} hth, Dave... -- http://www.dave.org.uk Let me see you make decisions, without your television - Depeche Mode (Stripped)
Re: CPAN site
On Tue, Apr 01, 2003 at 08:49:27AM -0800, Randal L. Schwartz wrote: Well, you can't run my MINICPAN[1] mirroring program against search.cpan.org, that I'm aware of. Nor would you want to. Of course, *you* shouldn't use www.cpan.org either. *You* should use uk.cpan.org. $ host uk.cpan.org uk.cpan.org has address 128.252.133.13 $ host 128.252.133.13 13.133.252.128.IN-ADDR.ARPA domain name pointer chaos.wustl.edu Why? It's in the US: $ traceroute uk.cpan.org traceroute to uk.cpan.org (128.252.133.13), 64 hops max, 44 byte packets 1 fa2-0.pepo.router.flirble.org (194.70.3.1) 1.749 ms 1.020 ms 0.947 ms 2 fa5-0-103.cr1.bllon.uk.easynet.net (212.134.0.1) 0.702 ms 1.114 ms 0.927 ms 3 ge0-2-0-0.br1.bllon.uk.easynet.net (212.135.0.3) 1.414 ms 1.062 ms 1.332 ms 4 ge0-0-0-0.gr0.bllon.uk.easynet.net (207.162.206.65) 1.706 ms 1.715 ms 1.820 ms 5 so0-1-0-0.gr0.bwnyc.us.easynet.net (207.162.205.5) 73.571 ms 73.850 ms 74.157 ms 6 iar5-so-2-0-1.NewYork.cw.net (208.173.135.213) 74.078 ms 74.340 ms 74.115 ms 7 agr2-loopback.NewYork.cw.net (206.24.194.102) 74.407 ms 73.339 ms 74.089 ms 8 dcr2-so-6-1-0.NewYork.cw.net (206.24.207.181) 74.015 ms 73.252 ms 73.901 ms 9 agr3-so-2-0-0.NewYork.cw.net (206.24.207.186) 73.765 ms agr4-so-2-0-0.NewYork.cw.net (206.24.207.190) 74.875 ms 73.466 ms 10 acr1-loopback.NewYork.cw.net (206.24.194.61) 74.539 ms 74.355 ms 73.881 ms 11 p4-3-2-0.r04.nycmny01.us.bb.verio.net (129.250.9.49) 73.750 ms p4-2-1-0.r04.nycmny01.us.bb.verio.net (129.250.9.77) 73.388 ms 73.850 ms 12 p16-1-1-0.r20.nycmny01.us.bb.verio.net (129.250.2.36) 74.247 ms 73.606 ms 74.176 ms 13 p16-4-0-0.r01.chcgil06.us.bb.verio.net (129.250.4.198) 100.462 ms 101.519 ms 100.564 ms 14 p16-7-0-0.r01.chcgil01.us.bb.verio.net (129.250.5.71) 100.663 ms 103.302 ms 101.323 ms 15 p4-1-2-0.r00.stlsmo04.us.bb.verio.net (129.250.4.45) 119.441 ms 120.948 ms 119.946 ms 16 ge-0-2-0.a00.stlsmo04.us.ra.verio.net (129.250.30.76) 121.452 ms 119.890 ms 120.165 ms 17 199.217.166.226 (199.217.166.226) 121.454 ms 128.130 ms 120.231 ms 18 128.252.1.201 (128.252.1.201) 121.736 ms 120.500 ms 121.368 ms 19 ncrc-eng1.wustl.edu (128.252.1.50) 120.991 ms 120.932 ms 121.367 ms 20 chaos.wustl.edu (128.252.133.13) 120.547 ms * 121.817 ms Surely you should use a mirror with lots of bandwidth in the UK: $ traceroute philes.flirble.org traceroute to philes.flirble.org (194.70.3.50), 64 hops max, 44 byte packets 1 philes (194.70.3.50) 3.177 ms 0.731 ms 0.664 ms (my traceroutes start in Soho) Nicholas Clark
Re: CPAN site
On Tue, 2003-04-01 at 19:46, Nicholas Clark wrote: On Tue, Apr 01, 2003 at 08:49:27AM -0800, Randal L. Schwartz wrote: Well, you can't run my MINICPAN[1] mirroring program against search.cpan.org, that I'm aware of. Nor would you want to. Of course, *you* shouldn't use www.cpan.org either. *You* should use uk.cpan.org. cut Surely you should use a mirror with lots of bandwidth in the UK: $ traceroute philes.flirble.org traceroute to philes.flirble.org (194.70.3.50), 64 hops max, 44 byte packets 1 philes (194.70.3.50) 3.177 ms 0.731 ms 0.664 ms Can't stand flirble.org, I prefer plig.org... Dirk -- Please Note: Some Quantum Physics Theories Suggest That When the Consumer Is Not Directly Observing This Product, It May Cease to Exist or Will Exist Only in a Vague and Undetermined State.
Re: RegEx for UK Postal Codes
On Tue, 01 Apr 2003 17:16:20 +0200, you (Philip Newton [EMAIL PROTECTED]) wrote: On 1 Apr 2003 at 13:47, Ulf wrote: At Tuesday, 1 April 2003, you wrote: m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ In Sweden, where I come from, postal codes are just 5 digits, so you would say: m/[0-9]{3}\s*[0-9]{2}/ Germany is even easier: /[0-9]{5}/ Norway: /[0-9]{4}/ And the numbers follows a certain pattern around from south-east, down south and then up west, and so on up northern Norway. Since the codes are always written without spaces, dashes, or other funny stuff. Same. (Although one might write 'N-' in front, as maybe every other country might, with their own country-code.) -- mvh/Regards Kåre Olai Lindbach
Re: CPAN site
On Tue, Apr 01, 2003 at 07:46:19PM +0100, Nicholas Clark wrote: On Tue, Apr 01, 2003 at 08:49:27AM -0800, Randal L. Schwartz wrote: Well, you can't run my MINICPAN[1] mirroring program against search.cpan.org, that I'm aware of. Nor would you want to. Of course, *you* shouldn't use www.cpan.org either. *You* should use uk.cpan.org. $ host uk.cpan.org uk.cpan.org has address 128.252.133.13 $ host 128.252.133.13 13.133.252.128.IN-ADDR.ARPA domain name pointer chaos.wustl.edu But if you do a GET you will see that it will redirect you to ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/ Graham. Why? It's in the US: $ traceroute uk.cpan.org traceroute to uk.cpan.org (128.252.133.13), 64 hops max, 44 byte packets 1 fa2-0.pepo.router.flirble.org (194.70.3.1) 1.749 ms 1.020 ms 0.947 ms 2 fa5-0-103.cr1.bllon.uk.easynet.net (212.134.0.1) 0.702 ms 1.114 ms 0.927 ms 3 ge0-2-0-0.br1.bllon.uk.easynet.net (212.135.0.3) 1.414 ms 1.062 ms 1.332 ms 4 ge0-0-0-0.gr0.bllon.uk.easynet.net (207.162.206.65) 1.706 ms 1.715 ms 1.820 ms 5 so0-1-0-0.gr0.bwnyc.us.easynet.net (207.162.205.5) 73.571 ms 73.850 ms 74.157 ms 6 iar5-so-2-0-1.NewYork.cw.net (208.173.135.213) 74.078 ms 74.340 ms 74.115 ms 7 agr2-loopback.NewYork.cw.net (206.24.194.102) 74.407 ms 73.339 ms 74.089 ms 8 dcr2-so-6-1-0.NewYork.cw.net (206.24.207.181) 74.015 ms 73.252 ms 73.901 ms 9 agr3-so-2-0-0.NewYork.cw.net (206.24.207.186) 73.765 ms agr4-so-2-0-0.NewYork.cw.net (206.24.207.190) 74.875 ms 73.466 ms 10 acr1-loopback.NewYork.cw.net (206.24.194.61) 74.539 ms 74.355 ms 73.881 ms 11 p4-3-2-0.r04.nycmny01.us.bb.verio.net (129.250.9.49) 73.750 ms p4-2-1-0.r04.nycmny01.us.bb.verio.net (129.250.9.77) 73.388 ms 73.850 ms 12 p16-1-1-0.r20.nycmny01.us.bb.verio.net (129.250.2.36) 74.247 ms 73.606 ms 74.176 ms 13 p16-4-0-0.r01.chcgil06.us.bb.verio.net (129.250.4.198) 100.462 ms 101.519 ms 100.564 ms 14 p16-7-0-0.r01.chcgil01.us.bb.verio.net (129.250.5.71) 100.663 ms 103.302 ms 101.323 ms 15 p4-1-2-0.r00.stlsmo04.us.bb.verio.net (129.250.4.45) 119.441 ms 120.948 ms 119.946 ms 16 ge-0-2-0.a00.stlsmo04.us.ra.verio.net (129.250.30.76) 121.452 ms 119.890 ms 120.165 ms 17 199.217.166.226 (199.217.166.226) 121.454 ms 128.130 ms 120.231 ms 18 128.252.1.201 (128.252.1.201) 121.736 ms 120.500 ms 121.368 ms 19 ncrc-eng1.wustl.edu (128.252.1.50) 120.991 ms 120.932 ms 121.367 ms 20 chaos.wustl.edu (128.252.133.13) 120.547 ms * 121.817 ms Surely you should use a mirror with lots of bandwidth in the UK: $ traceroute philes.flirble.org traceroute to philes.flirble.org (194.70.3.50), 64 hops max, 44 byte packets 1 philes (194.70.3.50) 3.177 ms 0.731 ms 0.664 ms (my traceroutes start in Soho) Nicholas Clark
Re: [OT] Broken sendmail
I can't tell you what's wrong with your system, or give you a guide to debugging email delivery, but I suspect there's something fishy about recent versions of glibc, so that *may* be your problem. I also tried installing evolution recently (the exact version escapes me), from Mandrake Cooker using urpmi. It upgraded my glibc from glibc-2.3.1-6mdk to glibc-devel-2.3.1-10mdk. I subsequentially discovered that I had broken MySQL-3.23.52-1.3mdk (it segfaulted on startup), and rpm-4.0.4-19mdk (it did too, when I tried to do anything nontrivial, like downgrade my glibc back to the original version). I don't use mutt, can't comment on that. After some hair-pulling I finally fixed the problem by uninstalling evolution, booting from the Mandrake 9.0 rescue CD and downgrading glibc back to 2.3.1-6 with the rescue disk's rpm. More details here: http://www.mandrakeclub.com/modules.php?op=modloadname=Splatt_Forumfile=viewtopictopic=5037forum=11 Nick
Re: RegEx for UK Postal Codes
This hardly qualifies as a clear RegEx, but I *think* that this fits all of the rules as summarised below: m/ [A-PR-UWYZ] (?: [0-9](?:[0-9]|A-HJKS-UW])? | [A-HK-Y][0-9](?:[0-9]|[ABEHMNPRVWXY])? ) \s \d[ABD-HJLNP-UW-Z]{2} /x All this is while leaving out, for the time being, the three exceptions isolated before. However, with a more complex (and concrete) regex in mind is there any way to make this work a little better? TIA jon ### Rules ## Valid formats: AN NAA M1 1AA ANN NAA M60 1NW ANA NAA W1A 1HQ AAN NAA CR2 6XH AANN NAA DN55 1PT AANA NAA EC1A 1BB 1. The letters Q, V and X are not used in the first position. 2. The letters I, J and Z are not used in the second position. 3. The only letters to appear in the third position are A, B, C, D, E, F, G, H, J, K, S, T, U and W. 4. The only letters to appear in the fourth position are A, B, E, H, M, N, P, R, V, W, X and Y. 5. The second half of the Postcode is always consistent numeric, alpha, alpha format and the letters C, I, K, M, O and V are never used I think that this is semantically correct but doesn't necessarily resolve whether or not it is correct in reality (e.g. N0 appears valid but is non-sensical -- that first 0-9 could, in all probability, be written 1-9). jon Dave Cross wrote: From: Jon Reades [EMAIL PROTECTED] Date: 4/1/03 10:47:55 AM I'm doing a little UK address validation, and after looking around on CPAN didn't come up with much except Reg::Common::zip, and that didn't cover UK addresses (Damian, your name is on this Module, are you listening? :) ). Almost everywhere else tried to sell me a service. I believe that Abigail is maintaining this module now. Patches are, almost certainly, welcome :) So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ If think I'd write that as: m/[A-Z]{1,2}\d[\dA-Z]?\s\d[A-Z]{2}/ There are two functional changes in there. I've replaced \d{1,2}[A-Z]{0,1} with \d[\dA-Z]? This seems to be closer to spec, which doesn't seem to allow ANNA in the outcode. I've also replaced \W (any non-word character) with \s (any whitespace character). In fact the spec specifically says that it should be a space, so maybe you should use ' '. My other changes (which don't effect the way the regex works) were: \d{1,1} - \d [A-Z]{2,2} - [A-Z]{2} hth, Dave... -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh
Re: CPAN site
Paul == Paul Mison [EMAIL PROTECTED] writes: Paul On 31/03/2003 at 22:39 +0100, Leon Brocard wrote: This is terrible, terrible: http://www.cpan.org/ Paul Out of interest, what do people get from www.cpan.org? I only ever use Paul search.cpan.org myself. What am I missing? (Please no Matt's Scripts Paul jokes, ta. April Fools has been tedious enough already.) Well, you can't run my MINICPAN[1] mirroring program against search.cpan.org, that I'm aware of. Nor would you want to. Of course, *you* shouldn't use www.cpan.org either. *You* should use uk.cpan.org. [1] google site:stonehenge.com MINICPAN -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
[OT] [SPAM] Cassiopeia EM-500
Following on from the discussions of PDAs, it occurs to me that my lovely, precious Palm has removed the need for my fairly chunky, but colour-screen Cassiopeia EM-500. Half.com is selling it used for 120 quid, they seem to retail on eBay for about 70. Reviews: - http://half.ebay.com/cat/buy/reviews.cgi?cpid=1011963129 - http://www.geek.com/hwswrev/pda/casioem500/ - http://www.zdnet.com/supercenter/stories/overview/0,12069,259152,00.html It runs on WinCE, so you have Windows compatability (ActiveSync CD included). Mac OS compatability is provided by http://www.pocketmac.net/, and you can also sync it up to Linux machines with an Infra-red port (not tried this, but details at http://www.cewindows.net/wce/linux-serial.htm). The screen has a minor scratch to it, that, while noticeable if you look carefully, has never gotten in my way. I'm looking for 70 to 80 quid for it, although ideally, I'd like to swap it for an old Apple Airport Card and a book on C++ programming; other interesting shiny things considered. +Pete -- Do not accustom yourself to use big words for little matters. -- Samuel Johnson
Re: CPAN site
On Tue, Apr 01, 2003 at 08:49:27AM -0800, Randal L. Schwartz wrote: Paul == Paul Mison [EMAIL PROTECTED] writes: Paul On 31/03/2003 at 22:39 +0100, Leon Brocard wrote: This is terrible, terrible: http://www.cpan.org/ Paul Out of interest, what do people get from www.cpan.org? I only ever use Paul search.cpan.org myself. What am I missing? (Please no Matt's Scripts Paul jokes, ta. April Fools has been tedious enough already.) Well, you can't run my MINICPAN[1] mirroring program against search.cpan.org, that I'm aware of. That is because http://search.cpan.org/CPAN/ is not a real CPAN mirror, it just redirects to the users selected mirror, which is stored in a cookie. Graham.
RegEx for UK Postal Codes
I'm doing a little UK address validation, and after looking around on CPAN didn't come up with much except Reg::Common::zip, and that didn't cover UK addresses (Damian, your name is on this Module, are you listening? :) ). Almost everywhere else tried to sell me a service. So far my regex looks like this (using the {} notation for consistency and readability): m/[A-Z]{1,2}\d{1,2}[A-Z]{0,1}\W\d{1,1}[A-Z]{2,2}/ According to the government document found here (this is the google cache for those of you without Word): http://216.239.53.100/search?q=cache:33rseCRZr6wC:www.lscdata.gov.uk/data/Annex%2520C.doc+what+is+UK+postal+code+formathl=enie=UTF-8 there's the interesting additional fact that C I K M O V cannot be used in the incode (the letters that come after the digit on the right-hand side). Of course, it doesn't tell me if this is a rule, or just a general statement of fact, but that could presumably help in validating addresses using a regex. However, I'm not sure if it's really worth the additional effort and complexity in the regex to include this. Would anyone care to offer any improvements or suggestions? jon -- jon reades fulcrum analytics t: 0870.366.9338 m: 0797.698.7392 f: 0870.888.8880 lower ground floor 2 sheraton street london w1f 8bh