delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1998/10/14/16:23:33

X-Authentication-Warning: central.caverock.co.nz: viking set sender to flying-brick.caverock.net.nz!viking using -f
Date: Wed, 14 Oct 1998 15:24:59 +1300 (NZDT)
From: Eric Gillespie <viking AT flying-brick DOT caverock DOT net DOT nz>
To: opendos AT delorie DOT com
Subject: Re: Sed script for stripping HTML
In-Reply-To: <Pine.LNX.3.96.981013212426.1121A-100000@brick.flying-brick.caverock.net.nz>
Message-ID: <Pine.LNX.3.96.981014151930.699A-100000@brick.flying-brick.caverock.net.nz>
MIME-Version: 1.0
Reply-To: opendos AT delorie DOT com

On Tue, 13 Oct 1998, Eric Gillespie wrote:

.... sed script....
:]       <--- close set
:*       <--- any number of chars of the preceding set

Ooops, forgot to add the last pattern to match...    
>        <--- to close the HTML comment.
//      <--- end pattern, and specify empty replace string
g       <--- do it right through the file...
' or "  <--- depending on OS (Unix = ', DOS = ") finishes the command
old.html     original filename
>       <--- redirect (unless you want it all going to screen?)
new.txt      new filename

:I haven't worked it out for removing stuff across lines yet (for removing
:Javascript and Java...) ...
after all, when Javascript is like <blahjava> script </blahjava>
it would mean a multiline sed script

Cheers again...

 /|   _,.:*^*:.,   |\  Cheers from the Viking family, including Marmalade 
| |_/'  viking@ `\_| | Running Linux and OpenDOS in Christchurch!
|    flying-brick    | $FunnyMail  Bilbo   : Now far ahead the Road has gone,
 \_.caverock.net.nz_/     5.39    in LOTR  : Let others follow it who can!


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019