Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: A regex question

by Anonymous Monk
on Oct 28, 2011 at 20:40 UTC ( #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


Comment on Re: A regex question
Select or Download Code
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
Node Status?
node history
Node Type: note [id://934505]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (16)
As of 2014-10-24 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (134 votes), past polls