Hello David,
Historians believe that Tue, 10 Apr 2001 at 11:42 GMT +0100 was when,
David Elliott [DE] typed the following:
<snip>
DE> I use the RegEx
DE>
%SETPATTREGEXP="(?m-s)^Date\:\s*?((.*?[\d]{4})\s*?([\d]{0,2}\:[\d]{0,2}\:[\d]{0,2})\s*?(.*))"%REGEXPBLINDMATCH="%HEADERS"
DE> On %ODATE at %SUBPATT="3"%SUBPATT="4" (which was %OTIME where I live) %OFROMNAME
DE> I would like to extend this so that when the Original subject contains
DE> [(PGP Decrypted)]at the end, it will produce a line something like
DE> On 08 April 2001 at 13:26:24 (my local time) you wrote.
I'm not sure I'm totally clear, you want this sentence *if* there *is*
"(PGP Decrypted)" at the end, right? Otherwise the output should be
what you get from the macro above?
DE> Is this possible ?
Yep. The easiest way to do this is to put the above regexp in a Quick
Template by itself. I'm going to assume you called it "DT-". Now
create a Quick Template with the alternate header and call it
"DT-PGP". Note if you do this method, make sure that you use common
names for the two quick templates. In other words, if you replace
"DT-" in one, replace it in the other too.
Next, in the calling template, use a regular expression like:
<regexp>
%QINCLUDE='DT-%SETPATTREGEXP="(?m-s)^Date\:.*?(PGP)\sDecrypted.*$"%REGEXPMATCH="%HEADERS"'
</regexp>
I have not fully tested this since I don't have PGP installed, but it
should work just fine. Note also that you could have done this with
only a single conditional regexp, but I think you'll find this is a
lot easier to maintain should you choose to change the phrasing of
your response at any point.
The way it works is, the new regexp creates a QT handle depending
if it matches "PGP Decryped" in the Date line. If it does match, then
the QT handle is "DT-PGP", otherwise the handle is "DT-" since it
didn't find "PGP" in the date line.
Let us know how well it works.
--
Thanks for writing,
Januk Aggarwal
Using The Bat! 1.51 under Windows 98 4.10 Build 2222 A
This almost blank page was intentional.
--
______________________________________________________
Archives : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>