Hello Jan

On Wed, 27 Sep 2000 17:37:45 -0400, Jan Rifkinson wrote:

JR>           Jan responds: Peter, thanks for the suggestion. Here's a
JR>           sample  of a Bouvier digest msg (Bouviers are dogs) that
JR>           I  clipped.  I  put  your  suggested  string  in a reply
JR>           template for this digest. Then I copied ^c this msg from
JR>           the  digest including the "from" line, Then I used F4 to
JR>           reply & got the following error msg.

JR>            *** Error: nothing to repeat ***

JR>            My goal is to lift "David" or "David Frye" from the msg &
JR>            possibly the "Date info" as well to reply to.

JR>            Thanks so much for your thoughts on this.  This process
JR>            is like panning for gold in the US Northwest in 1935.

JR> -----|| original digest message ||-----
JR> Message: 1
JR>    Date: Tue, 26 Sep 2000 06:49:37 -0400
JR>    From: "David Frye" <[EMAIL PROTECTED]>
JR> Subject: Re: Digest Number 752/itching

JR> My girls have been having an itching problem for several weeks, usually
JR> worst after going outside.  I found a benadryl tablet helps.
JR> When the weather cools off my girls should get better.
JR> -----|| End Digest Msg ||-----

It's not necessary to go via the clipboard, just selecting the text
and then pressing F4 should work.

I have put together a regexp for the reply template that extracts the
name of the Sender:

<onelongline>
%SETPATTREGEXP='From: (\"?(.+?)\"? *<|([-.\w]*)@)'
%REGEXPBLINDMATCH='%TEXT'%SUBPATT='2'%SUBPATT='3'
</onelongline>

It handles several forms of addresses:
From: name <address@domain>
From: "name" <address@domain>
From: address@domain

in the first two cases it extracts the name, in the last case it
extracts the address. A short explanation:
/1/ the regexp has the form 'From: (aaa|bbb)'
    the matching text has to begin with the exact string 'From: ' and
    the there are two possibilities (placeholders aaa and bbb)
    all that is matched inbetween the parens is put into SUBPATT=1
/2/ placeholder aaa = '\"?(.*?)\"? *<'
    - \"?     a beginning quote is ignored
    - (.+?)   ungreedy match up to the ending sequence (SUBPATT=2)
    - \"? *<  ending sequence: an angle bracket, possibly prefixed by
              a quote and spaces
/3/ placeholder bbb = '([-.\w]*)@'
    - ([-.\w]*)  any number of  hyphen, dots, letters, digits and
                 underscores (SUBPATT=3)
    - @          followed by an @

    
The desired regexp for the date has been brought up several times in
the last days and weeks, so i just paste it without any explanation
(there is one change though: %REGEXPMATCH="%TEXT" instead of the usual
%HEADERS)

<onelongline>
%SETPATTREGEXP="(?m-s)Date\:\s*((.*?[\d]{4})\s*?([\d]{0,2}\:[\d]{0,2}\:[\d]{0,2})\s*?(.*))"%REGEXPMATCH="%TEXT"
</onelongline>


And i tried the %clipboard, it seems to work. So you could replace in
the RE's for the name and the date %TEXT with %CLIPBOARD, put another
regexp for quoting the text (this one using %TEXT) into you r reply
template. Then you would have to select and copy the From: and Date:
line and then select the part of the text you want to quote and press
F4. Very complicated...

I hope i was not too complicated myself ;-)

Peter
-- 
Peter Steiner <[EMAIL PROTECTED]>

-- 
--------------------------------------------------------------
View the TBUDL archive at http://tbudl.thebat.dutaint.com
To send a message to the list moderation team double click here:
   <mailto:[EMAIL PROTECTED]>
To Unsubscribe from TBUDL, double click here and send the message:
   <mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------

You are subscribed as : archive@jab.org


Reply via email to