Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Question why this Regex isn't matching

by ww (Archbishop)
on Sep 30, 2011 at 18:54 UTC ( [id://928896]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Question why this Regex isn't matching
in thread Question why this Regex isn't matching

There are far better ways to achieve your goal than using regexen.

Parsing HTML is notoriously fraught with difficulties; the more so, when that HTML is not compliant with well-known standards (4.10 strict; 4.01 loose in particular) That means rolling your own flies in the face of the caution against re-inventing wheels.

To minimize you problems, take a look at the various modules built for the job. A search of CPAN (or ActiveState with ppm if you're on Windows and using AS's Perl) will present a wealth of well-tested and stable (reliable) options.

HTML::Parser, HTML::TableParser, and HTML::Extract are just a few of the many that may suit your needs.

  • Comment on Re^4: Question why this Regex isn't matching

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 15:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found