Re: Select all invalid e-mail addresses

Поиск
Список
Период
Сортировка
От Steve Atkins
Тема Re: Select all invalid e-mail addresses
Дата
Msg-id 20051020193709.GB32591@gp.word-to-the-wise.com
обсуждение исходный текст
Ответ на Re: Select all invalid e-mail addresses  ("Andrus" <eetasoft@online.ee>)
Список pgsql-general
On Thu, Oct 20, 2005 at 09:54:13PM +0300, Andrus wrote:
> "Andrew Sullivan" <ajs@crankycanuck.ca> wrote in message
>
> > 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.)
>
> Andrew, thank you.
>
> I understand now that I do'nt want to validate TLDs at all.
>
> I have an existing database of e-mail addresses. Those addesses are copied
> from letters so they contain < > chars, points, commas etc. stupid
> characters.
> Sometimes two email addresses are copied to this field (contains two @
> sings, spaces or commas). Sometimes web addresses starting with www. and
> without @ are present in email column.
> I want simply to allow user to view those addresses and make manual
> corrections before starting large mailing session in night.
>
> How to write a WHERE clause which selects e-mail addresses which
> are surely wrong ?

... WHERE email !~ '...insert previously mentioned regex here...';

Cheers,
  Steve

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

Предыдущее
От: Richard_D_Levine@raytheon.com
Дата:
Сообщение: Re: [HACKERS] 'a' == 'a '
Следующее
От: Steve V
Дата:
Сообщение: Precompiled win32 binary for getCurrentTransactionID?