Body mangling [message #159302] |
Thu, 21 May 2009 22:27 |
icarus
Messages: 52 Registered: May 2005
Karma: 0
|
Member |
|
|
Hi!
I'm an absolute idiot when it comes to regexps. I want to remove the following lines in the body:
_______________________________________________
ppd-hh-test mailing list
ppd-hh-test@....de
http://daris.dabo.de/cgi-bin/mailman/listinfo/ppd-hh-test
I already found this message: http://fudforum.org/forum/index.php?t=msg&goto=32297#msg_32297
And I tried it - with the success that I got an empty body ...
I'm really doing something wrong - but I don't know what it is. What do I have to enter in which field to make it work?
Michael
[Updated on: Thu, 21 May 2009 22:27] Report message to a moderator
|
|
|
|
|
|
|
Re: Body mangling [message #184591 is a reply to message #159325] |
Sun, 12 January 2014 08:51 |
rshannon
Messages: 18 Registered: August 2002
Karma: 0
|
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
|
|
|