home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
LANGUAGE
/
ADA
/
LOVELACE
/
rmhtml
< prev
next >
Wrap
Text File
|
1996-10-01
|
408b
|
18 lines
#!/usr/local/bin/perl -w
# rmhtml - remove HTML markings.
# This filter copies standard input to standard output,
# removing HTML markings (anything between <> and between & and ;).
$in_pre_section = 0;
while (<>) {
if (m/^ *<pre> *$/i) { $in_pre_section = 1; }
elsif (m/^ *<\/pre> *$/i) { $in_pre_section = 0; }
elsif (not $in_pre_section) {
s/<[^>]*>//g;
s/&[a-z][a-z]*;/ /g;
print;
}
}