Summary | Improper regular expressions for matching addresses in Horde/UI/VarRenderer/html.php |
Queue | Horde Base |
Queue Version | 3.1-RC3 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | |
Requester | voegelas (at) gmx (dot) net |
Created | 02/27/2006 (7147 days ago) |
Due | |
Updated | 03/02/2006 (7144 days ago) |
Assigned | |
Resolved | 03/02/2006 (7144 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
for word boundaries: \b(ACT|NSW|NT|QLD|SA|TAS|VIC|WA)\b. Possibly,
the regex for UK addresses should also be updated.
what address style these regular expressions are supposed to match?
you're not quite up to a patch, you could start a small wiki page -
probably under the developer docs, http://wiki.horde.org/Doc/Dev -
with notes on the code.
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Improper regular expressions for matching addresses in Horde/UI/VarRenderer/html.php
Queue ⇒ Horde Base
Australian addresses also matches addresses that contain the text
"USA", ie. US American addresses. I think that the regex should check
for word boundaries: \b(ACT|NSW|NT|QLD|SA|TAS|VIC|WA)\b. Possibly, the
regex for UK addresses should also be updated.
BTW, what about adding comments with example addresses that show what
address style these regular expressions are supposed to match?
The code for European style addresses doesn't seem to match German
addresses. At least, not the address style suggested by the German
Post. Here's an example for national mail:
Muster GmbH COMPANY NAME (optional, of course)
Max Mustermann FIRST NAME followed by LAST NAME
Musterstr. 1a STREET or P.O. BOX
12345 Musterhausen POSTAL CODE followed by CITY NAME
The German postal code must never be prefixed with "D-" although there
are still people who do this. Instead, the country name must be given
in German, French or English on another line. An example for
international mail:
John Dundee
Harbour Place 4
CANBERRA ATC 4568
AUSTRALIEN