Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Re: Extract text from HTML

by Anonymous Monk
on Dec 28, 2002 at 18:07 UTC ( #222758=note: print w/replies, xml ) Need Help??

in reply to Re: Extract text from HTML
in thread Extract text from HTML

jdporter, Thanks a ton for your help ..... that did it. I had a question though ..... with regards to my question and your answer, I am using -
my $we = extract_html_text($browser->{res}->content); my @note = $we =~ m/Note:\s*([^<]+)/gi;
to first strip the HTML gook and then search the remainder for "Note". The thing is that "@note" prints out everything after Note: i.e. all the other coding in the remainder of the (formerly) HTML file, etc. Is there any way I can get it to search for Note:, collect all the information after it and stop when it reaches "Pre" or "Attrib" or "Link"? Would greatly appreciate your feedback. Thanks.

Replies are listed 'Best First'.
Re: Re: Re: Extract text from HTML
by Anonymous Monk on Dec 28, 2002 at 19:07 UTC
    How about:
    my ($note) = $we =~ m/Note:\s*(.+?)(?:Pre|Attrib|Link)/sgi

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2023-03-27 10:03 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.