Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

RE: RE: Re: HTML Tag Remover

by lolindrath (Scribe)
on Aug 07, 2000 at 02:37 UTC ( #26466=note: print w/replies, xml ) Need Help??


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 04:56 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://26466]
help
Chatterbox?
[Corion]: perldigious: That seems to be more the export and likely it's the recipients of that export that like the titles changes
[Corion]: ... "changed"
[Corion]: I usually expect fixed header names, but am sometimes lenient in the order of columns. But changing the report titles often sounds to me as if you are not the sole consument of the export ;)
[shmem]: perldigious: as always - if it ain't broke, don't fix it. Ther must be a very compelling reason for changing column names in a database. Those are rare.
[Corion]: If you have whitespace in the column names in the database, whap the DBAs ;)
[shmem]: It's common for some vendors to have column names such as WRSTVG or some other such whizzbang, and another table where these names are mapped to something meaningful depending on how you look at the data

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-05-25 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?