On Sat, Jun 15, 2002 at 01:54:13PM -0700, Daniel Quinlan wrote:
  
| Craig R Hughes <[EMAIL PROTECTED]> writes:
| 
| > Changed back to 0.5 -- as mentioned in previous message, this is
| > triggering on the sourceforge-appended footers on mailing list
| > mails.
| 
| Maybe it would be better to find a way to remove sourceforge footers
| from everything?

They have footers?


This is a portion of my recently assembled mail scrubbing framework,
slightly modified to be standalone.


#!/usr/bin/env python

import sys , re
message = sys.stdin.read()

# sf.net lists
pattern = re.compile(
      r"""
        (?mxs) # MULTILINE , VERBOSE , DOTALL
        # the sprint ad sep. has 63, the list trailer has 47
        ^[^_\n]* (?: _{47} | _{63} )
        .*
        ^[^h]*https://lists\.sourceforge\.net[^\n]*\n
       """ )

sys.stdout.write( pattern.sub( "" , message ) )


:-)

You're welcome to convert that to perl (the regex is mostly p-c) and
apply it sooner (my setup applies the scrubbers immediately before
delivery).

-D

-- 

Dishonest money dwindles away,
but he who gathers money little by little makes it grow.
        Proverbs 13:11
 
http://dman.ddts.net/~dman/

Attachment: msg06422/pgp00000.pgp
Description: PGP signature

Reply via email to