Spike,

> Not wanting to rain on the parade, but are you sure that the 
> regex will not reject some valid email addresses with folding 
> whitespace inside commments?
> 
> Also an email address of the form:
> 
> "Paul Johnston" <[EMAIL PROTECTED]> is perfectly 
> valid according to rfc2822, but I think your regex would reject it.
> 
> There may be a few other valid constructs that get rejected, 
> but those are two that spring immediately to mind.

You're not raining on the parade.  That's fine!  You are right that it will
not cope with folding whitespace, and therefore it doesn't entirely work
within the specification.  However, all I was wanting to write was a regular
expression that would validate the full email address (ie the part of the
specification that deals with "local-part").

As I said in one of my emails about this, the scenario you mentioned above
is not something that website programmers have to deal with very often.  And
most people realise that the important bit to check is the bit between angle
brackets.

I never said that it supported all of the functionality of rfc2822 but I did
say that I had created the regex with rfc2822 in mind.

To add in those extras wouldn't be too hard, but I don't think it's entirely
necessary.

That could be a next iteration of the function anyway.  To test with or
without folding whitespace.  For now, let's stick at this!

Paul




--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to