Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: A regex question

by Anonymous Monk
on Oct 28, 2011 at 20:40 UTC ( [id://934505]=note: print w/replies, xml ) Need Help??


in reply to A regex question

See Re: Help With Online Table Scraper, Re: Formating a HTML document to show certain text.

$ lwp-download "http://perlmonks.com/?abspart=1;displaytype=displaycode;node_id=934485;part=1" junk.html
281 bytes received

$ perl htmltreexpather.pl junk.html _tag a
HTML::Element=HASH(0xb31bcc) 0.1.0 John.Martines /html/body/a /html/body/a /html/body/a[@href='page.aspx?a=c4bc46eswsdw32fcc'] ------------------------------------------------------------------ HTML::Element=HASH(0xb31d2c) 0.1.1.0.0 Mary Jones /html/body/ul/li/a /html/body/ul/li/a /html/body/ul/li/a[@href='page.aspx?a=0a2b-a99d-3754eb2f5e35'] ------------------------------------------------------------------ HTML::Element=HASH(0xb31e0c) 0.1.1.1.0 Fernando Praderas /html/body/ul/li[2]/a /html/body/ul/li[2]/a /html/body/ul/li[2]/a[@href='page.aspx?a=1ef7b100-8dc4-4b40-871c-68b1d +0'] ------------------------------------------------------------------ ##################################################################

HTML::Query

use HTML::Query qw{ Query }; print "$_\n" for Query( file => q{junk.html} )->query( q{a[href~=page.aspx]} )->as_text ; __END__ John.Martines Mary Jones Fernando Praderas

Replies are listed 'Best First'.
Re^2: A regex question
by emelianenko (Initiate) on Oct 28, 2011 at 21:00 UTC
    Thank you, very much appreciate, definitively the formatting that i received via wget was something to consider in addition to the rest of the work. And I will study this too. kind regards

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found