Hello TB Tech List, The filter found in The Bat! Library does not function as "advertised." The problem is in the export template. The following macro was tested with all 21 possible locations of multi-line In-Reply-To and References lines (since I don't know the official rules as to where these must be).
What are the 21 locations? If 'I' represents a set of In-Reply-To lines, 'R' represents a set of Reference lines and '-' represents other header lines, the 21 possible locations are: -, I-, -I-, -I, R-, -R-, -R, IR-, I-R-, I-R, -IR-, -I-R, -IR, -I-R-, RI-, R-I-, R-I, -RI-, -R-I, -RI, -R-I- --8<---------------cut here---------------start------------->8--- %SetPattRegExp="(?ismx) (?: (?: (.*?) # SubPatt 1 (?: ^In-Reply-To: | ^References: ) .*?\n(?:\s.*?\n)* (.*?) # SubPatt 2 (?: ^In-Reply-To: | ^References: ) .*?\n(?:\s.*?\n)* (.*?) # SubPatt 3 ) | (?: (.*?) # SubPatt 4 (?: ^In-Reply-To: | ^References: ) .*?\n(?:\s.*?\n)* (.*?) # SubPatt 5 ) | (.*?) # SubPatt 6 ) \n\n\z"%- %RegExpBlindMatch="%Headers"%- %SubPatt="1"%SubPatt="2"%SubPatt="3"%- %SubPatt="4"%SubPatt="5"%SubPatt="6"%- In-Reply-To: %ClipBoard %Text%- --8<---------------cut here---------------end--------------->8--- The Remove_Reference export template is very similar. The only difference is that it ends with these two lines: %SubPatt="4"%SubPatt="5"%SubPatt="6" %Text%- I don't believe this set of filters will work with attachments. One way of doing that is to export the mail as a Unix mailbox file and running an external utility to do the deed. Please let me know if you see any improvements or problems I've overlooked. I plan to post the filters (in LDI Format ready to be pasted into the Sorting Office) in TBUDL after this List has had a chance to comment. -- Best regards, Bill "God created sex. Priests created marriage." [Voltaire] ________________________________________________________ http://www.silverstones.com/thebat/TBUDLInfo.html