Search Postgresql Archives

Re: Select all invalid e-mail addresses

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

 



On Tue, 2005-10-25 at 13:01, Andrus wrote:
> >> This regex allows email addresses containing two dots without any
> >> letters,
> >> like eeta..soft@xxxxxxxxx
> >
> > That's because the regular expression is wrong: it simply checks
> > the local part for zero or more non-@ characters instead of checking
> > against the RFC822/RFC2822 specification.  Use a search engine to
> > find a more complete regular expression (beware: it's long).
> 
> Michael, thank you.
> I found correct regexp from
> http://www.twilightsoul.com/Domains/Voyager/DeveloperVision/BestPracticesPatterns/EmailAddresses/tabid/134/Default.aspx?PageContentID=2
> 
> but this needs to be converted to Postgres. It causes the famuous ERROR:
> invalid regular expression: invalid character range.
> Since text editor find/replace cannot be used to convert it it is probably
> not reasonable to waste time trying to make the following code to work in
> Postgres.
> 
> Andrus.

PERL REGEX SNIPPED.

That's because it's a perl regex, not a posix or sql regex.  IF you
wrapped it in a plperl function, then you could use it.  Anyone know if
the PCRE library can handle this thing?   I guess I could try it myself.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

[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