On Sunday, October 31, 2004, at 18:38:18 [UTC+0100] (Sunday, October 31,
2004 18:38 my local time) Britt Malka wrote:

>> %SetPattRegExp="(?ism)(.*)^----- Original Message
>> -----.*"%RegexpMatch(%Text)

> This works, but how do I add more or less "-" and the Danish
> translations too?

You can use alternatives in regular expression, like this:

(?ism)(.*)^(-+\s*Original Message\s*-+.*|-+\s*Oprindelig meddelelse-+\s*.*)

I re-worked my filter to be more universal and attached it to this message
to avoid wrapping of long lines. Open attachment in Notepad (or another text
editor), Copy the filter and paste it into Read Message filters. It uses
Ctrl+F11 to trigger. See also on filter criteria. I used two alternatives
there, but it may be changed accordingly to your needs (for example single
"@" character presence in Sender may be sufficient).

Filter first export message in Unix format to file "C:\Temp\Unix_Msg.txt",
then export modified message to file "C:\Temp\export.msg", and then import
such modified message from file "C:\Temp\export.msg" using Unix format. It
seems a bit complicated, but due to such double conversion all kind of
messages can be processed. Finally, the file "C:\Temp\export.msg" is deleted
and original non-modified message is moved to Trash.

In attached text file you can find a replacement for %Quotes macro in your
reply template. This quotes only text without MS add-ons.

Attachments:
  [1] Remove_Original_MSG.txt

-- 
Best regards,
Zygmunt Wereszczynski
(Using The Bat! v3.0.2.4 Rush on Windows 2000 5.0 Build 2195 Service Pack 4
with BayesIt! 0.7.4)
$$$$ TB! Message Filter $$$$
beginFilter
UID: [46366FC0.01C4BF72.0ED72447.1B28D568]
Name: Remove_Original_MSG
Filter: 
{\0D\0A\20`4`0`-\20Original\20Message\0D\0A1`4`0`-Oprindelig\20meddelelse\0D\0A}
MoveMessage folder \5C\5C\5CTrash
ExportMessage OverwriteExist FmtUnix filename C:\5CTemp\5CUnix_Msg.txt
ExportMessage OverwriteExist FmtText filename C:\5CTemp\5Cexport.msg template 
%_OldMsg(%Put\3D\22C:\5CTemp\5CUnix_Msg.txt\22)%-\0D\0A%SetPattRegExp\3D\22(?ism)(.*)^(-+\5Cs*Original\20Message\5Cs*-+.*|-+\5Cs*Oprindelig\20meddelelse-+\5Cs*.*)\22%RegexpMatch(%_OldMsg)\0D\0A
RunExternal Wait CmdLine 
C:\5CProgram\20Files\5CThe\20Bat!\5Cthebat.exe\20/IMPORTF\3DInbox;X;FILE\3D\22C:\5CTemp\5Cexport.msg\22;DELETE
IsManual
IsActive
IsHotkey
IsCheckRule
IsHotkeyOnly
Ignore
endFilter



This is replacement for %Qutes macro in reply template:

%Quotes='%SetPattRegExp="(?ism)(.*)^(-+\s*Original Message\s*-+.*|-+\s*Oprindelig 
meddelelse-+\s*.*)"%RegexpMatch(%Text)'%-
________________________________________________________

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

Reply via email to