On Fri, 17 Dec 1999 17:57:44 +0800, Thomas Fernandez wrote:

> 
>%Subject=""%Subject=(%SETPATTREGEXP="(?i)((Re|Aw)\:\s*)*(.*)"%REGEXPBLINDMATCH="%OSUBJ"Re:
> %SUBPATT="3")

> I don't know whether this should work, as the parameter for %Subject
> has three lines, and I have just concatenated them. I don't know
> whether this is allowed. - Feel free to abandon the parenthesis.

See below...

> How do you know that the RegExp works? Have you tried just putting it
> (either the QT or the three-line REgExp) into the reply template, I
> mean in the body of the message, not the subject? Does it show the
> corrected subject?

Create for demonstration purposes the following reply template
(perhaps for a new folder created for this sort of tests):

%SETPATTREGEXP="(?i)((Re|Aw)\:\s*)*(.*)"
%REGEXPBLINDMATCH="%OSUBJ"
1. OSUBJ : %OSUBJ
2. Patt0 : %SUBPATT="0"
3. Patt1 : %SUBPATT="1"
4. Patt2 : %SUBPATT="2"
5. Patt3 : %SUBPATT="3"

Then create a fake message with a subject like "Re: aw: AW: re: Aw:
Test", move it to the folder with the demo template and hit reply.
You will see:

1. OSUBJ : aw: AW: re: Aw: Test
2. Patt0 : aw: AW: re: Aw: Test
3. Patt1 : Aw: 
4. Patt2 : Aw
5. Patt3 : Test

You notice that the first Re: is already stripped by TB! itself and
that for the repeated mathcing subpatterns 1 and 2 only the last
match is shown...

> If, yes, the problem may lie with the %Subject macro. Maybe it doens't
> accept QT's at all?

I've found out that you CAN nest these macros, but the result is not
what you want. You have to double the quotes inside the string.

So you can create the QT strip-re-intl (all on one line an NO return
at the end):

%SETPATTREGEXP="(?i)((Re|Aw)\:\s*)*(.*)"%REGEXPBLINDMATCH="%OSUBJ"%SUBPATT="3"

and call it in your reply template

%subject=""%subject="Re: %qinclude=""strip-re-intl"""

but the subject shows at the end a CRLF displayed as two additional
black boxes. As i found out now how to put quotes into strings (i
thought i've tried that earlier...) i finally applied your
suggestion to not use a QT and doubled the quotes: <tada mode>

%subject=""%subject="Re: 
%SETPATTREGEXP=""(?i)((Re|Aw)\:\s*)*(.*)""%REGEXPBLINDMATCH=""%OSUBJ""%SUBPATT=""3"""

</tada mode>
That seems to work :-)

(See also my separate bug report post on this subject)

Regards

Peter
-- 
Peter Steiner <[EMAIL PROTECTED]>        PGP-ID 0x02850F53 (DH/DSS)
PGP Fingerprint 68AB D08E D995 41B4 C6FD  639D 9B94 D249 0285 0F53
"Schtill! Was ziberlet dert n�bem Tobel�hli
z grachtige n uuf u aab?" - Franz Hohler

-- 
--------------------------------------------------------------
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]>
--------------------------------------------------------------

Reply via email to