procmail
[Top] [All Lists]

Re: HTML attachments

1997-06-26 03:40:00
"Wotan" == Wotan  <wotan(_at_)netcom(_dot_)com> writes:

Wotan> This be untested, but feel free to try it though:

Wotan> :0 B
Wotan> ^----*.*$^Content-Transfer-Encoding: 7bit$^Content-Type: text/html
Wotan> {
Wotan> :0 B
Wotan> | sed "/^----*.*$^Content-Transfer-Encoding: 
7bit$^Content-Type:text\/html/,$ d"
Wotan> }

Won't work: sed doesn't do multi-line matching. Maybe if you use the
hold space, but I'm not that far into the _sed & awk_ book. perl would
work.

Also, I don't see why you need the braces.

:0Bi
* ^----*.*$^Content-Transfer-Encoding: 7bit$^Content-Type: text/html
| perl -0777pe 's/^----*.*^Content-Transfer-Encoding: 
7bit^Content-Type:text\/html(.|\n)*\Z//m'

This should all be one line. Untested as always.

-- 
Guy Geens <ggeens(_at_)iname(_dot_)com>
Home Page: http://www.elis.rug.ac.be/~ggeens
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 
"Now excuse me, I have some Daemons to fight"   -- Firkin

<Prev in Thread] Current Thread [Next in Thread>