Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: How do I extract text from an HTML page?

by ido50 (Scribe)
on Aug 03, 2003 at 17:57 UTC ( [id://280472]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I extract text from an HTML page?
in thread How do I extract text from an HTML page?

A few corrections:
1. Replace "(Well actually you don't have if you..." with "(Well actually you don't have to worry about it if you...".
2. After the print HTML "bla bla" statement I forgot to include a ";", and you should add after it a "close HTML" statement too.

----------------------
Live fat, die young
  • Comment on Re: Re: How do I extract text from an HTML page?

Replies are listed 'Best First'.
Re: Re: Re: How do I extract text from an HTML page?
by ido50 (Scribe) on Aug 03, 2003 at 18:00 UTC
    Last two corrections (Not my day today):
    1. I also forgot a terminating double quote in the print HTML "bla bla" statement. 2. Replace the "[^<>]" in the regex with "([^<>])".

    ----------------------
    Live fat, die young
      Two suggestions: test before you post (and then test some more) and don't use regexes to parse HTML. Granted, this is trivial HTML to parse, but the more you use parsers, the better you get at it. Also, the more you use templating modules, the better you get at them. I hate to just outright solve the problem, but i did. Here is link that you will have to click to see my solution - so any readers have been warned.

      <blink>
      WARNING *SPOILERS* CLICK AT OWN RISK!
      </blink>

      It's a lot more code than you posted, but it does a lot more as well. ;)

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://280472]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-18 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found