following some threads on regex matching on this list, i was able to write some 
one-liners in Perl that cleaned up forwarded messages that i typically see in list 
emails.

so, you turn something like:

>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

into:

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

into:

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

but, rather than peck out simplistic pattern-matching code ala sed or awk, i was 
wondering if some Perl tools exist already that help re-format inline messages.

hell, even sharing a personal perl script that cleans up messages would be appreciated.

my next project (while squeezing in my normal work routine, of course : P ) is to 
filter inline forwarded messages so that they not only remove angle brackets, and 
left-indent, but also have only one blank line between "paragraphs".

my embarrasingly simple problem is how to tell a snippet of pattern-matching perl code 
what a "paragraph" is...

anyhow, i guess i'm asking 3 questions:

1) is there some good message filtering Perl code flying around out there?
2) how to define a "paragraph" in Perl script (so as to act on the stuff _after_ a 
paragraph is encountered).
3) where is a near-comprehensive listing of pattern-matching code for Perl scripts on 
the web?  for example, i would never have figured out the '^M' filter to be 'cM' as 
one poster suggested, or even '\r' as someone else suggested.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to