E-mail edit

Jay Ashworth jra at baylink.com
Wed Apr 4 08:31:17 PDT 2012


---- Original Message -----
> From: scooter6 at gmail.com

> Okay - that being said, how would I modify the edit sample he sent??
> where would I allocate allowing the "+" sign?
> 
> On Wed, Apr 4, 2012 at 11:16 AM, Jay Ashworth <jra at baylink.com> wrote:
> 
> > ----- Original Message -----
> > > From: "Chris Rendall" <crendall at teamind.com>
> >
> > > em1 - {{A} | {N} | {"&"} | {"-"} | {"_"} | [!" "!]} | {"/"}
> > > email - _ {em1|"."} "@" {em1{"."}} A A [A]

Bless you, my son.  :)

emLHS - {{A} | {N} | {"&"} | {"-"} | {"_"} | {"+"} | [!" "!]} | {"/"}
emRHS - {{A} | {N} | {"&"} | {"-"} | [!" "!]} | {"/"}
email - _ {emLHS|"."} "@" {emRHS{"."}} A A [A]

That modification (which I've only written, not tested :-), assumes that 
domain names can't include an underscore, which they cannot.  Apple
got in trouble a few years ago for tightening that up in an OS release,
but I think the net's been cleaned up on that point by now.

That also allows a forward slash on either side, which I'm relatively 
certain is actually illegal, though I haven't reread 2821 *today*.  :-)

If you have a file full of records with emails, I recommend adding an extra 
field with this edit, and running a process that just copies the old field
to the new (or you can just copy it into a dummy), and complains if the old 
field had something in it, and the new one's empty.

Note also that some email addresses can get *stupidly* long; German university
emails were particularly bad about that; 60 characters is not unreasonable
for an email field; I've personally seen 40 chars clip about 1% of addresses
in a relatively large mailing list (on the order of 100k records).

This edit also assumes *bare* email addresses with no quotes or other
RFC syntactic sugar (which causes cancer of the semicolon), like angle 
brackets.

Cheers,
-- jra
-- 
Jay R. Ashworth                  Baylink                       jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com         2000 Land Rover DII
St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274


More information about the Filepro-list mailing list