Alex Schroeder <[EMAIL PROTECTED]> writes:
> Mats Löfdahl <[EMAIL PROTECTED]> writes:
>
> > May I suggest a change in the regular expression that determines
> > whether a zip code is US or continental?
>
> You are right of course; in Switzerland and Portugal four digits are
> used, and in Germany and France five digits are used (those are the
> countries I know about, anyway).
>
> You could therefore set bbdb-continental-zip-regexp to something like
> this:
> "^\\s *\\([A-Z][A-Z]?\\s *-\\s *\\)?[0-9][0-9][0-9] ?[0-9][0-9]?"
>
> If you find that it works well, the default could be changed. At the
> moment I don't feel to sure about it... :) And I won't be testing it
> because I have all Swiss addresses with the CH- prefix in my BBDB...
Thanks.
I tried it and it indeed recognizes "133 36" as continental and
displays it in front of the city. However, it also matches US 5-digit
zip codes with no space...
I think the regexp has to be the OR of the old expression (requiring
the prefix) and a new expression that requires the space.
> > Another thought is, in the absence of zip code country prefix, to
> > look at the country field. If it is a European country it should
> > be displayed as a continental address. But then one would need a
> > list of countries so that might not be a good idea.
>
> The sample code I had for Brazilian and Japanese addresses used an
> identifying function that relied on the country names. You could
> look at the mail archive to find the URL of the world post friends
> (or whatever the organisation is called) -- they have the "standard"
> for all countries of the world, and then you could code the
> identifying function and the formatting function for either one. But
> it's a lot of work... :)
I'd be completely satisfied with the regexp solution.
--
Mats Löfdahl + Voice: +46 8 16 44 80
Royal Swedish Academy of Sciences + Fax: +46 8 16 42 28
Stockholm Observatory + [EMAIL PROTECTED]
SE-133 36 Saltsjöbaden, Sweden + [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/