On Jan 28, 2:27 pm, [EMAIL PROTECTED] wrote:
> Hi everyone
> It cost nothing to be polite and only a few seconds to be helpful. I was
> myself looking at RFC822 a few days ago to try to figure out what headers
> should be in an
> email message I bounce with my Perl re-wtite script from a procmail recipe.
> Secret formats and being generally unhelpful are a M$ trait, not to be cloned.
> --
> Andrew in Edinburgh,Scotland.
And to close the issue.

Was looking for info on the email RFC too and ran into this.

http://www.regular-expressions.info/email.html

and the "final" word on the matter.   Do read what he has to say but
here is the monster regx

$emailx = qr((?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?
^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\
[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?
[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-
z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-
\x09\x0b\x0c\x0e-\x7f])+)\]));

master regular expressions has a .pl that builds this up, in a modular
way, with comments.  Find it here:

http://examples.oreilly.de/english_examples/regex/

 ps 2apart. I'm lazy too.   Ignore posts like that.  Some have legit
concerns that the group will get out of hand.  Most, however, are
bored.  This is not a political group or alt.hvac.  I'd never go out
of my way to say something like that.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to