[PLUG] sed regex to strip html code

Rich Shepard rshepard at appl-ecosys.com
Wed Jul 3 18:16:13 UTC 2002


On Wed, 3 Jul 2002, Rich Shepard wrote:

>   I'm trying to put together a one-line sed program that will strip html
> codes from a text file and leave the text behind. I've not yet succeeded.
> I've tried:  sed 's/\<.*\>//g' <filename> > <output_filename>
> and it extracts angle brackets but does not remove them from the file.
> Instead, it puts the extracted text into the output file.

  I've solved my problem using the text editor, 'joe', by doing a combination
of plain text (for the angle brackets) and a regex for all the included
text.

Many tools, plethora of solutions.

Rich






More information about the PLUG mailing list