dmtelf has asked for the wisdom of the Perl Monks concerning the following question:
I need to strip one line and a range of lines between two tags.
I'm not sure on the best way to do this so would appreciate advice from fellow Monks. My initial attempts were miserable convoluted failures.
As an example, save the source HTML for this page onto HD as example.htm.
Given a filename which is a saved PerlMonk page (e.g. example.htm),
Strip out:
Entire <layer src="http://adfu.blockstackers.com/servfu.pl....."line. (the line above appears after <BODY text="#000000" bgcolor="#FFFFFF" link="#000066" vlink="#333399">)
From <!-- nodelets start here --> to last </CENTER>(before </BODY>)
Save the rest under a different filename.
Perhaps this should be a feature of the PerlMonks site like those websites which offer a button "Prepare this page for printing/emailing" etc alongside all articles etc. What do you think?
dmtelf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Stripping tags from a PerlMonks page.
by davorg (Chancellor) on Jul 25, 2000 at 15:30 UTC | |
|
RE: Stripping tags from a PerlMonks page.
by DrManhattan (Chaplain) on Jul 25, 2000 at 20:09 UTC | |
|
Re: Stripping tags from a PerlMonks page.
by fundflow (Chaplain) on Jul 25, 2000 at 17:30 UTC | |
by davorg (Chancellor) on Jul 25, 2000 at 17:42 UTC | |
|
Re: Stripping tags from a PerlMonks page.
by turnstep (Parson) on Jul 25, 2000 at 22:48 UTC |