Re: Select all invalid e-mail addresses

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Select all invalid e-mail addresses
Дата
Msg-id 20051020155240.GD9291@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на Re: Select all invalid e-mail addresses  ("Andrus" <eetasoft@online.ee>)
Ответы Re: Select all invalid e-mail addresses  (Steve Atkins <steve@blighty.com>)
Список pgsql-general
On Thu, Oct 20, 2005 at 06:10:40PM +0300, Andrus wrote:
> >From this thread I got the regular expression

[snipped]

Note that that regular expression, which appears to be validating
TLDs as well, is incredibly fragile.  John Klensin has actually
written an RFC about this very problem.  Among other problems, what
do you do when a country code ceases to be?  (There's a similar
problem that the naming bodies struggke with from time to time.)

I suggest that if you want to validate TLDs, you pull them off when
you write the data in your database, and use a lookup table to make
sure they're valid (you can keep the table up to date regularly by
checking the official IANA registry for them).  At least that way you
don't have to change a regex every time ICANN decides to add another
TLD.  (The regex is wrong anyway, I think: it doesn't have .mobi,
which has been announced although isn't taking registrations yet, and
it doesn't appear to have arpa, either.)

A


--
Andrew Sullivan  | ajs@crankycanuck.ca
Information security isn't a technological problem.  It's an economics
problem.
        --Bruce Schneier

В списке pgsql-general по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: 3-state logic (was: Re: NULL != text ?)
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Select all invalid e-mail addresses