FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Body mangling
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Body mangling [message #159302] Thu, 21 May 2009 22:27 Go to next message
icarus is currently offline  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 #159306 is a reply to message #159302] Fri, 22 May 2009 05:23 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I cannot test right now, but something like this should work:

/______(.*)\/mailman\/listinfo\/ppd-hh-test/s

Leave "Replace with" empty.

Best regards.

Frank
Re: Body mangling [message #159310 is a reply to message #159306] Fri, 22 May 2009 06:26 Go to previous messageGo to next message
icarus is currently offline  icarus   
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

Thanks for trying me to help. But ... this rule only creates an empty body as well Sad

Michael
Re: Body mangling [message #159316 is a reply to message #159310] Fri, 22 May 2009 15:10 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
It works for me. Have you escaped all the backslashes and used the /s modifier?
Re: Body mangling [message #159325 is a reply to message #159316] Fri, 22 May 2009 23:18 Go to previous messageGo to next message
icarus is currently offline  icarus   
Messages: 52
Registered: May 2005
Karma: 0
Member

Hi!

I entered it the following way:
http://dl.getdropbox.com/u/18169/bilder/FUD-Bodymangling%201.png
http://dl.getdropbox.com/u/18169/bilder/FUD-Bodymangling%202.png

Michael
Re: Body mangling [message #184591 is a reply to message #159325] Sun, 12 January 2014 08:51 Go to previous message
rshannon is currently offline  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! Smile

[Updated on: Sun, 12 January 2014 18:57]

Report message to a moderator

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Some Pre-Sale Questions
Next Topic: Stop Forums Showing Home Page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 22 05:03:59 GMT 2024

Total time taken to generate the page: 0.02703 seconds