body mangling - regex [message #27478] |
Fri, 09 September 2005 12:14 |
davidgordon
Messages: 25 Registered: May 2005
Karma: 0
|
Junior Member |
|
|
I want to remove a multi line mailing list footer from emails imported to FUDForum using maillist.php
I'm a little hard of thinking when it comes to regex. Would someone save me from having to do the advanced course and show me how to remove something like
--------------------------
Mailing List
Line about posting
Another line about archive
--------------------------
for example?
I have tried entering the footer in the body mangling section of the Mailing List Manager but am only able to enter the first line. This gets removed as expected! But how can I remove the whole multi line footer?
Thanks you
|
|
|
Re: body mangling - regex [message #27486 is a reply to message #27478] |
Fri, 09 September 2005 14:00 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well you can remove everything from the start of the footer till the end. So if the footer starts with something like:
-------------------
your regex can be
-------------------.*$
and set "s" flag
FUDforum Core Developer
|
|
|
|
Re: body mangling - regex [message #27507 is a reply to message #27506] |
Fri, 09 September 2005 15:36 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
If you enter a multi-line footer you need format it so that it is on one line.
FUDforum Core Developer
|
|
|
|
Re: body mangling - regex [message #27511 is a reply to message #27508] |
Fri, 09 September 2005 20:21 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Take a look @ pcre regex examples on php.net this is the engine powering FUDforum's message mangling mechanism.
FUDforum Core Developer
|
|
|