Search Postgresql Archives

Re: Select all invalid e-mail addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Andrus" <eetasoft@xxxxxxxxx> writes:

> I have a database of e-mail addresses.
> 
> I want to select the email addresses which are not valid:
> 
> do not contain exactly one @ character,
> contain ; > < " ' , characters or spaces etc.
> 
> What is the WHERE clause for this ?
> 

There was a thread here not so long ago about matching valid email addresses.
It's not so simple.  You probably want to do a regex match - e.g.

select ... where email ~ '<regex>'

However the regex for all valid email possibilities is *VERY* complex.
see: http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html

You should probably search the maillist archives.  ISTR that there were
some suggestions on how one might simplify the search space.



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux