Debian Codegraph @

t/testbox-3

raw
1 From <[email protected]> Thu Jan 2 16:43:01 2003
2 Received: from onion.valueclick.com ([64.70.54.95] helo=onion.perl.org)
3 by deep-dark-truthful-mirror.pad with smtp (Exim 3.36 #1 (Debian))
4 id 18U8RX-0001Jq-00
5 for <[email protected]>; Thu, 02 Jan 2003 16:43:40 +0000
6 Received: (qmail 98153 invoked by uid 1005); 2 Jan 2003 16:43:37 -0000
7 Mailing-List: contact [email protected]; run by ezmlm
8 Precedence: bulk
9 List-Post: <mailto:[email protected]>
10 List-Help: <mailto:[email protected]>
11 List-Unsubscribe: <mailto:[email protected]>
12 List-Subscribe: <mailto:[email protected]>
13 Delivered-To: mailing list [email protected]
14 Received: (qmail 98135 invoked by uid 76); 2 Jan 2003 16:43:36 -0000
15 Received: from pc1-blac2-3-cust247.mant.cable.ntl.com (HELO glympton.airtime.co.uk) (81.97.36.247) by onion.perl.org (qpsmtpd/0.20) with SMTP; 2003-01-02 16:43:36Z
16 Received: from tenacity (ntlworld.com) [127.0.0.1] by glympton.airtime.co.uk with esmtp (Exim 3.36 #1 (Debian)) id 18U8O6-0001M5-00; Thu, 02 Jan 2003 16:40:06 +0000
17 Message-ID: <[email protected]>
18 Date: Thu, 02 Jan 2003 16:43:01 +0000
19 From: Adam Rice <[email protected]>
20 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130
21 X-Accept-Language: en-gb, en, ja
22 MIME-Version: 1.0
23 To: [email protected]
24 Subject: Re: Zip/Postal codes.
25 References: <[email protected]> <[email protected]>
26 In-Reply-To: <[email protected]>
27 X-SMTPD: qpsmtpd/0.20, http://develooper.com/code/qpsmtpd/
28 Content-Type: text/plain; charset="us-ascii"
29 Content-Length: 478
30 Lines: 10
31 Content-Transfer-Encoding: 8bit
32 Status:
33
34 David Sheldon wrote:
35 > m/(^|\W)(([A-Za-z][0-9]|[A-Za-z][0-9]{2}|[A-Za-z][A-HJ-Ya-hj-y][0-9]|[A-Za-z][A-HJ-Ya-hj-y][0-9]{2}|[A-Za-z][0-9][A-Za-z]|[A-Za-z][A-HJ-Ya-hj-y][0-9][A-Za-z])\s+[0-9][ABD-HJLP-UW-Zabd-hjlp-uw-z]{2}|[Gg][iI][Rr]\W+0[aA]{2})(\W|$)/
36
37 I think it's worth mentioning that, right or wrong, postcodes are often
38 written without the space in the middle. Abigail didn't mention whether
39 he wanted to just match the canonical form, or match any common form.
40
41 Adam
42
43
44
45 From <[email protected]> Thu Jan 2 16:51:17 2003
46 Received: from onion.valueclick.com ([64.70.54.95] helo=onion.perl.org)
47 by deep-dark-truthful-mirror.pad with smtp (Exim 3.36 #1 (Debian))
48 id 18U8ZS-0001Md-00
49 for <[email protected]>; Thu, 02 Jan 2003 16:51:51 +0000
50 Received: (qmail 8341 invoked by uid 1005); 2 Jan 2003 16:51:47 -0000
51 Mailing-List: contact [email protected]; run by ezmlm
52 Precedence: bulk
53 List-Post: <mailto:[email protected]>
54 List-Help: <mailto:[email protected]>
55 List-Unsubscribe: <mailto:[email protected]>
56 List-Subscribe: <mailto:[email protected]>
57 Delivered-To: mailing list [email protected]
58 Received: (qmail 8315 invoked by uid 76); 2 Jan 2003 16:51:47 -0000
59 Received: from cpe3236303635383434.cpe.net.cable.rogers.com (HELO cs839290-a.mtth.phub.net.cable.rogers.com) (24.114.172.6) by onion.perl.org (qpsmtpd/0.20) with SMTP; 2003-01-02 16:51:47Z
60 Received: by cs839290-a.mtth.phub.net.cable.rogers.com (Postfix, from userid 500) id BD50416EE1; Thu, 2 Jan 2003 11:51:17 -0500 (EST)
61 Date: Thu, 2 Jan 2003 11:51:17 -0500
62 From: Rick Delaney <[email protected]>
63 To: Abigail <[email protected]>
64 Cc: [email protected]
65 Subject: Re: Zip/Postal codes.
66 Message-ID: <[email protected]>
67 References: <[email protected]>
68 Mime-Version: 1.0
69 User-Agent: Mutt/1.2.5.1i
70 In-Reply-To: <[email protected]>; from [email protected] on Thu, Jan 02, 2003 at 03:29:43PM +0100
71 X-SMTPD: qpsmtpd/0.20, http://develooper.com/code/qpsmtpd/
72 Content-Type: text/plain; charset="us-ascii"
73 Content-Length: 572
74 Lines: 22
75 Content-Transfer-Encoding: 8bit
76 Status:
77
78 On Thu, Jan 02, 2003 at 03:29:43PM +0100, Abigail wrote:
79 >
80 > For Canada, I have: /[A-Z]\d[A-Z] \d[A-Z]\d/, but does Canada
81 > use all 26 letters?
82
83 No. This covers it:
84
85 /[ABCEGHJKLMNPRSTVXY][0-9][A-Z] [0-9][A-Z][0-9]/;
86
87 > Is there any checksum buildin?
88
89 LOL! More like a big collection of maps that changes every five years
90 with the census.
91
92 The space in the middle is required by Canada Post but if you're
93 accepting user input it's better to make it optional, as well as allow
94 lower case, and just reformat before using.
95
96 --
97 Rick Delaney
98 [email protected]
99
100
101 From <[email protected]> Thu Jan 2 17:02:31 2003
102 Received: from onion.valueclick.com ([64.70.54.95] helo=onion.perl.org)
103 by deep-dark-truthful-mirror.pad with smtp (Exim 3.36 #1 (Debian))
104 id 18U8hN-0001Pg-00
105 for <[email protected]>; Thu, 02 Jan 2003 17:00:01 +0000
106 Received: (qmail 23320 invoked by uid 1005); 2 Jan 2003 16:59:56 -0000
107 Mailing-List: contact [email protected]; run by ezmlm
108 Precedence: bulk
109 List-Post: <mailto:[email protected]>
110 List-Help: <mailto:[email protected]>
111 List-Unsubscribe: <mailto:[email protected]>
112 List-Subscribe: <mailto:[email protected]>
113 Delivered-To: mailing list [email protected]
114 Received: (qmail 23303 invoked by uid 76); 2 Jan 2003 16:59:56 -0000
115 Received: from osp.demon.nl (HELO foad.org) (212.238.163.113) by onion.perl.org (qpsmtpd/0.20) with SMTP; 2003-01-02 16:59:56Z
116 Received: (qmail 13635 invoked by uid 1000); 2 Jan 2003 17:02:31 -0000
117 Date: Thu, 2 Jan 2003 18:02:31 +0100
118 From: Abigail <[email protected]>
119 To: Adam Rice <[email protected]>
120 Cc: [email protected]
121 Subject: Re: Zip/Postal codes.
122 Message-ID: <[email protected]>
123 References: <[email protected]> <[email protected]> <[email protected]>
124 Mime-Version: 1.0
125 User-Agent: Mutt/1.2.5i
126 In-Reply-To: <[email protected]>; from [email protected] on Thu, Jan 02, 2003 at 04:43:01PM +0000
127 X-SMTPD: qpsmtpd/0.20, http://develooper.com/code/qpsmtpd/
128 Content-Type: text/plain; charset="us-ascii"
129 Content-Length: 835
130 Lines: 19
131 Content-Transfer-Encoding: 8bit
132 Status:
133
134 On Thu, Jan 02, 2003 at 04:43:01PM +0000, Adam Rice wrote:
135 > David Sheldon wrote:
136 > > m/(^|\W)(([A-Za-z][0-9]|[A-Za-z][0-9]{2}|[A-Za-z][A-HJ-Ya-hj-y][0-9]|[A-Za-z][A-HJ-Ya-hj-y][0-9]{2}|[A-Za-z][0-9][A-Za-z]|[A-Za-z][A-HJ-Ya-hj-y][0-9][A-Za-z])\s+[0-9][ABD-HJLP-UW-Zabd-hjlp-uw-z]{2}|[Gg][iI][Rr]\W+0[aA]{2})(\W|$)/
137 >
138 > I think it's worth mentioning that, right or wrong, postcodes are often
139 > written without the space in the middle. Abigail didn't mention whether
140 > he wanted to just match the canonical form, or match any common form.
141
142
143 I'll probably make it so that people can do things like:
144
145 use Regexp::Common;
146 /$RE{zip}{British}/; # Uses ' ' as separator.
147 /$RE{zip}{British}{-sep => '\s*'}/; # Uses \s* as separator.
148 /(?i)$RE{zip}{British}/; # Case insensitive match.
149
150
151 Abigail
152
153