Re: Body mangling [message #184591 is a reply to message #159325] |
Sun, 12 January 2014 08:51 |
rshannon
Messages: 18 Registered: August 2002
Karma:
|
Junior Member |
|
|
For those who are new to the programming conventions known as "regular expressions" (Regex), or FUDforum, or both, and like to have things spelled out in cookbook detail, perhaps some extra verbiage will help further explain how to remove Mailman mailing list footers, so they won't appear when mailing list messages are imported into forum posts.
The "Optional Body Mangling" Replace Mask: variables are entered in the two text boxes to the right, one large and one small. In the first, larger text box, enter the following Regex expression:
______(.*)\/mailman\/listinfo\/listname
...where listname is the name of Mailman mailing list. (In the prior post, the listname was "ppd-hh-test", for example.) What this Regex seeks to indentify is a string of characters that begins with a series of at least several underscore characters, then includes some variable number of stuff in the middle, and ends with "/mailman/listinfo/listname", which taken together, is a pattern that rather precisely describes the standard Mailman footer. In the smaller text box to the right, enter just plain "s" (no quotes).
Note that the first, larger text box is already bracketed on each side by two forward slashes (/) which indicates those forward slashes are normally necessary parts of the Regex needed here, but you don't have to enter them. Instead, they are automagically included for you. Note that the smaller text box is also preceded by one forward slash (/) for the same reason. [In other words, if you had to write this particular Regex for some other programming task, you'd normally have to include the slashes yourself.]
Lastly, on the next line, the single text box to the right of Replace with: should be left empty. Nada.
Best of all, it works! The Mailman footers will no longer be splashed all over the forum posts. Woot!
[Updated on: Sun, 12 January 2014 18:57] Report message to a moderator
|
|
|