in reply to Re: Double Splits?
in thread Double Splits?
my @split = split(/\|/, "$html_this_file"); my $html_of_file = get $split[0]; my @prefs = split(/\#/, "$split[1]); my $j; for ($j = 0; $j <= $#prefs; $j++) { $html_of_file =~ s/$split[2]/<!--PARSE-->/s; $html_of_file =~ s/$split[3]/<!--PARSE-->/s; my @pieces = split(/<!--PARSE-->/, $html_of_file); $html_of_file = $pieces[1]; $html_of_file =~ s/<script.*\/script>//gis; $html_of_file =~ s/<style.*\/style>//gis; if ($prefs[$j] eq 'a') { $html_of_file =~ s/<a.*\/a>//gis; } elsif ($prefs[$j] eq 'all') { $html_of_file =~ s/<.*?>//gis; } else { $html_of_file =~ s/<$prefs[$j].*?>//gis; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Double Splits?
by Fastolfe (Vicar) on Dec 22, 2000 at 22:26 UTC | |
by Anonymous Monk on Dec 22, 2000 at 22:33 UTC |