in reply to Regex's on Text of HTML (using HTML::Parser)
merlyn has a recent article called "The Wrong Parser for the Right Reasons" which covers something very similar. Give it a read, and see if it suits your goal. A brief synopsis from the top of the article:
More and more these days, you get faced with a problem with angle brackets somewhere in the data. How do you find what you're looking for in HTML or XML data?At first glance, the question has an obvious answer. If you have an HTML task, you use HTML::Parser or some derived or wrapper class. If you have an XML task, you use XML::Parser or XML::LibXML. But maybe the obvious answer isn't always the best. Let's look at a couple of cases.
|
|---|