Hello George,

On Monday, August 11, 2003 at 11:32 GMT +0300, a stampede was started
when George M. Menegakis [GMM] hollered:

GMM> The  last  two days I tried to create a reply template that quotes lines
GMM> that are not empty or have only whitespaces.

You'll need to use a recursive template.  These are much easier in the
current beta series (1.63b8 or later).  Since you appear to be using
the current beta, you can try the following engine.

Note: This template will ***NOT*** work in versions 1.63b7 or lower.

=====[Begin ReQuote QT]=====
%REM='
       Blank line quoting routine using features from TB 1.63b11
       Written August 2003 by Januk Aggarwal

       Notes:
          1. This template can be used alone to modify clipboard
             contents or can be used as an engine by assigning text to
             the variable, %_RQ_Text, in the driver template.
'%-
%-
%IF:'%_RQ_FirstTime'='':'%-
%___%IF:"%_RQ_Text"="":"%_RQ_Text(%Clipboard)"%-
%___%_RQ_FirstTime="No"'%-
%-
%IF:'%_RQ_Text'<>'':'%-
%-
%SetPattRegexp="(?is-m)^(.*?)(\n(.*)|)\z"%-
%RegexpBlindMatch(%_RQ_Text)%-
%-
%_RQ_Line_1(%Subpatt(1))%-
%_RQ_Remainder_Of_Text(%Subpatt(3))%-
%-
%If:"%-
%____%SetPattRegexp=!^\s*$!%-
%____%RegexpMatch=!%_RQ_Line_1 !"<>"":"%-
%____> "%_RQ_Line_1
%-
%_RQ_Text(%_RQ_Remainder_of_Text)%-
%-
%QInclude(ReQuote)'%-
=====[ End  ReQuote QT]=====

So your main template would need something like:

=====[Begin Template Extract]=====
%_RQ_Text(%Quotes)%-
%QInclude(ReQuote)%-
=====[ End  Template Extract]=====

-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.63 Beta/11 under Windows 98 4.10 Build 2222 A


________________________________________________________

http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to