Re: [GENERAL] Email Verfication Regular Expression

2005-09-13 Thread Steve Atkins
On Tue, Sep 13, 2005 at 09:02:46PM +0200, Peter Eisentraut wrote: > Steve Atkins wrote: > > If you want to validate email addresses you _must_ check the TLD as > > part of the sanity checking, as many of the typos that are > > theoretically detectable are detectable by that check. > > Your require

Re: [GENERAL] Email Verfication Regular Expression

2005-09-13 Thread Peter Eisentraut
Steve Atkins wrote: > If you want to validate email addresses you _must_ check the TLD as > part of the sanity checking, as many of the typos that are > theoretically detectable are detectable by that check. Your requirements may be different than mine, but I often make up "fake" TLDs for testing

Re: [GENERAL] Email Verfication Regular Expression

2005-09-13 Thread Steve Atkins
On Tue, Sep 13, 2005 at 12:59:43PM +0200, Stephane Bortzmeyer wrote: > On Wed, Sep 07, 2005 at 12:21:45PM -0700, > Steve Atkins <[EMAIL PROTECTED]> wrote > a message of 26 lines which said: > > > /[EMAIL PROTECTED]@(?:[EMAIL > > PROTECTED])?[a-z0-9-_]+\.(?:a[defgilmnoqrstuwz]|b[abdefghijmnorst

Re: [GENERAL] Email Verfication Regular Expression

2005-09-13 Thread Stephane Bortzmeyer
On Thu, Sep 08, 2005 at 12:16:36PM -0600, Cristian Prieto <[EMAIL PROTECTED]> wrote a message of 66 lines which said: > res = res_query(name, C_IN, T_MX, answer, sizeof(answer)); Besides Randal Schwartz' excellent remark (do not forget the records, too), remember that the Internet is not

Re: [GENERAL] Email Verfication Regular Expression

2005-09-13 Thread Stephane Bortzmeyer
On Wed, Sep 07, 2005 at 12:21:45PM -0700, Steve Atkins <[EMAIL PROTECTED]> wrote a message of 26 lines which said: > /[EMAIL PROTECTED]@(?:[EMAIL > PROTECTED])?[a-z0-9-_]+\.(?:a[defgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmoz]|e[ceghrst]|f[ijkmorx]|g[abdefhilmnpqrstuwy]

Re: [GENERAL] Email Verfication Regular Expression

2005-09-08 Thread Randal L. Schwartz
> "Cristian" == Cristian Prieto <[EMAIL PROTECTED]> writes: Cristian> res = res_query(name, C_IN, T_MX, answer, sizeof(answer)); This incorrectly fails if an address has an "A" record but no "MX" record. According to RFC 2821 Section 5: The lookup first attempts to locate an MX record a

Re: [GENERAL] Email Verfication Regular Expression

2005-09-08 Thread Cristian Prieto
Well, I guess this could be a hard-expensive way to do it but I've done this little Stored Function, it doesn't use a regular expresion (you could pass your email first to one to check it out I guess). #include "postgres.h" #include "fmgr.h" #include #include #include PG_FUNCTION_INFO_V1(di

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Peter Eisentraut
Brad Nicholson wrote: > Does anybody have regular expression handy to verfiy email addresses? There are Perl modules on CPAN to verify just about anything. Email::Valid comes to mind here. These can of course be plugged into a PL/Perl function. -- Peter Eisentraut http://developer.postgresql.

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Randal L. Schwartz
> "Steve" == Steve Atkins <[EMAIL PROTECTED]> writes: Steve> So I consider any use of characters outside that set in a hostname or Steve> "domain name" to be invalid. Specifically an underscore is not a valid Steve> character, so any use of an underscore in the domain-part of an Steve> address

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Steve Atkins
On Wed, Sep 07, 2005 at 01:33:51PM -0700, Randal L. Schwartz wrote: > > "Steve" == Steve Atkins <[EMAIL PROTECTED]> writes: > > Steve> But, depending on what you're doing, validation may not be a good > Steve> idea. There are email addresses that are syntactically invalid that > Steve> are del

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Steve Atkins
On Wed, Sep 07, 2005 at 03:52:11PM -0500, Bruno Wolff III wrote: > On Wed, Sep 07, 2005 at 12:21:45 -0700, > Steve Atkins <[EMAIL PROTECTED]> wrote: > > > > /[EMAIL PROTECTED]@(?:[EMAIL > > PROTECTED])?[a-z0-9-_]+\.(?:a[defgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmoz]|e[

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Randal L. Schwartz
> "Steve" == Steve Atkins <[EMAIL PROTECTED]> writes: Steve> But, depending on what you're doing, validation may not be a good Steve> idea. There are email addresses that are syntactically invalid that Steve> are deliverable and in active use. Really? Name one. Or maybe it's just your idea o

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Bruno Wolff III
On Wed, Sep 07, 2005 at 12:21:45 -0700, Steve Atkins <[EMAIL PROTECTED]> wrote: > > /[EMAIL PROTECTED]@(?:[EMAIL > PROTECTED])?[a-z0-9-_]+\.(?:a[defgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmoz]|e[ceghrst]|f[ijkmorx]|g[abdefhilmnpqrstuwy]|h[kmnrtu]|i[delnoqrst]|j[mop]|k[e

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Steve Atkins
On Wed, Sep 07, 2005 at 11:17:10AM -0400, Brad Nicholson wrote: > Does anybody have regular expression handy to verfiy email addresses? It's not possible to validate an email address with a regex. If you're prepared to handwave over things like whitespace and embedded comments you can validate wit

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-07 11:17:10 -0400: > Does anybody have regular expression handy to verfiy email addresses? This is what I have. The comment notes the caveats. -- CREATE FUNCTION IS_EMAILADDRESS {{{ -- returns TRUE if $1 matches the rules for RFC2822 addr-spec token, -- ignoring

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Welty, Richard
Randal L. Schwartz wrote: >Absolutely not. It rejects which is a perfectly >valid email address. (Try it, you'll get my autoresponder.) >Google for "RFC 822" and "RFC 2822" to see the *real* rules. An >actual regex for an email address is rather large. there's an extended example in appendix

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Ben
a lot! - Original Message - From: "Michael Glaesemann" <[EMAIL PROTECTED]> To: "Brad Nicholson" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, September 07, 2005 9:41 AM Subject: Re: [GENERAL] Email Verfication Regular Expression On Sep 8, 2005, at 12:17 AM, Brad

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Randal L. Schwartz
> "Markus" == Markus Rebbert <[EMAIL PROTECTED]> writes: Markus> Am Mittwoch, den 07.09.2005, 11:17 -0400 schrieb Brad Nicholson: >> Does anybody have regular expression handy to verfiy email addresses? Markus> ^([a-zA-Z0-9._-]+)\@(([a-zA-Z0-9-]+[.]?){1,}[a-zA-Z0-9-]*+\.){1,}[a-zA-Z]{2,4}$

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Cristian Prieto
05 9:41 AM Subject: Re: [GENERAL] Email Verfication Regular Expression On Sep 8, 2005, at 12:17 AM, Brad Nicholson wrote: Does anybody have regular expression handy to verfiy email addresses? http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html :) Michael Glaesemann grzm myrealbox com

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Douglas McNaught
Brad Nicholson <[EMAIL PROTECTED]> writes: > Does anybody have regular expression handy to verfiy email addresses? It's harder than you think. For one that handles it in fairly full generality, see Jeffrey Friedl's book _Mastering Reguar Expressions_. The regex he comes up with is quite a beast.

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Michael Glaesemann
On Sep 8, 2005, at 12:17 AM, Brad Nicholson wrote: Does anybody have regular expression handy to verfiy email addresses? http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html :) Michael Glaesemann grzm myrealbox com ---(end of broadcast)--

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Markus Rebbert
Am Mittwoch, den 07.09.2005, 11:17 -0400 schrieb Brad Nicholson: > Does anybody have regular expression handy to verfiy email addresses? ^([a-zA-Z0-9._-]+)\@(([a-zA-Z0-9-]+[.]?){1,}[a-zA-Z0-9-]*+\.){1,}[a-zA-Z]{2,4}$ but i don't think, it's really complete. best regards, Markus ---

[GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Brad Nicholson
Does anybody have regular expression handy to verfiy email addresses? -- Brad Nicholson Database Administrator, Afilias Canada Corp. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an ind