How do I get the address from which the mail was sent, if I want to reply
with a confirmation request? Is it acceptable to parse the From: header
for the following Perl regexp:
.*(<|\w)\@(>|\w)
And the resulting match would be the address to which I can reply?
--
Satya. http://satya.virtualave
It's almost always more complicated than you think. See
formail, for instance, or the rfc822 stuff in Python/Mailman.
I think your algorithm would be too simple.
> How do I get the address from which the mail was sent, if I want to reply
> with a confirmation request? Is it acceptable to parse
On Jan 12, 2001 at 21:47, Dan Mick wrote:
>It's almost always more complicated than you think. See
>formail, for instance, or the rfc822 stuff in Python/Mailman.
Com-pli-cated. I'm in no mood to make sense of RFC 822 right now, and
Python still eludes me.
If anyone wants, it's a single functi
On Sat, 13 Jan 2001 21:33:57 +0530 (IST)
Satya <[EMAIL PROTECTED]> wrote:
> Com-pli-cated. I'm in no mood to make sense of RFC 822 right now,
> and Python still eludes me.
> $pa_addr=~s/(.*)(<|\s)(.*?\@.*?)(>|\s)(.*)/$3/;
Which is broken, and yes, I'll let you read the RFC to find out
why.
On Jan 13, 2001 at 09:34, J C Lawrence wrote:
[re a regexp I posted, and am to embarassed to quote]
>Which is broken, and yes, I'll let you read the RFC to find out
>why. If you want to do it right, with low effort, make the call-out
>to formail.
Yes, I should make the effort to do it right. I
On Sat, 13 Jan 2001 23:11:23 +0530 (IST)
Satya <[EMAIL PROTECTED]> wrote:
> Gotta learn Python...
I recommend the O'Reilly books.
--
J C Lawrence [EMAIL PROTECTED]
-(*) http://www.kanga.nu/~claw/
--=| A man is as sane as
On 1/13/01 9:34 AM, "J C Lawrence" <[EMAIL PROTECTED]> wrote:
> Which is broken, and yes, I'll let you read the RFC to find out
> why.
Or you can look at Mail::Address in the perl CPAN libraries, which does it
properly, and which will give you an idea why this regex is way too
simplistic -- a
At 10:31 -0800 1/13/01, Chuq Von Rospach wrote:
>> Which is broken, and yes, I'll let you read the RFC to find out
>> why.
>
>Or you can look at Mail::Address in the perl CPAN libraries, which does it
>properly, and which will give you an idea why this regex is way too
>simplistic -- and wrong.
O
On 1/13/01 7:03 PM, "John W Baxter" <[EMAIL PROTECTED]> wrote:
> Or one can look at Mastering Regular Expressions page 316 which contains,
> in highly compressed micro type, a 6,598 byte (he says) regular expression
> for matching email addresses.
Thanx. I remembered that, went looking for it, a
John W Baxter <[EMAIL PROTECTED]> writes:
> Or one can look at Mastering Regular Expressions page 316 which contains,
> in highly compressed micro type, a 6,598 byte (he says) regular expression
> for matching email addresses.
Something has to be wrong. The mail address syntax described in RFC
[EMAIL PROTECTED] said:
> Or one can look at Mastering Regular Expressions page 316 which
> contains, in highly compressed micro type, a 6,598 byte (he says)
> regular expression for matching email addresses. (The previous
> several pages develop the RE.) Jeffrey E. F. Friedl O'Reilly (of
> cour
11 matches
Mail list logo