HTML -> ASCII
Jaroslav Klaus
J.Klaus at sh.cvut.cz
Thu Oct 7 15:59:44 CEST 1999
On Thu, Oct 07, 1999 at 02:06:45PM +0200, Tomas TPS Ulej wrote:
> Keby to fungovalo bolo by to fajn, zial... vystup = vstup
>
> Moja poziadavka je vystup bez formatovacich prikazov HTML.
Jezkovyvoci, odkud jsem to sebral?
Ted je to spravne
S omluvou
Jarda Klaus
-------------- next part --------------
#!/usr/bin/perl
# converts html files into ascii by just stripping anything between
# < and >
# written 4/21/96 by Michael Smith for WebGlimpse
$carry=0;
while(<STDIN>){
$line = $_;
if($carry==1){
# remove all until the first >
next if($line!~s/[^>]*>//);
# if we didn't do next, it succeeded -- reset carry
$carry=0;
}
while($line=~s/<[^>]*>//g){};
if($line=~s/<.*$//){
$carry=1;
}
print $line;
}
More information about the Users-l
mailing list