Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

RE: RE: Re: HTML Tag Remover

by lolindrath (Scribe)
on Aug 06, 2000 at 22:37 UTC ( [id://26466]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to RE: Re: HTML Tag Remover
in thread HTML Tag Remover

Ok, I added this line before the other regex and it seemed to work, though it is a little specific to that problem. it simple removes anything that has more than one pointy bracket after it. If you want to keep these in you can always replace it with some character and replace it with the pointy brackets after its done with the html tag stripping. This is the revised code
#!/usr/bin/perl -w open FILE, "c:\\html\\test.html" || die "can't open file"; @text = <FILE>; $text = join( "", @text ); close FILE; #print $text; $text =~ s/>[>+]//g; # < -- Added this line $text =~ s/\<(.*?)\>//sg; print $text;


--=Lolindrath=--

Replies are listed 'Best First'.
RE: RE: RE: Re: HTML Tag Remover
by merlyn (Sage) on Aug 07, 2000 at 00:56 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://26466]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.