Keep It Simple, Stupid | |
PerlMonks |
Re: Regex to match first html tag previous to textby erroneousBollock (Curate) |
on Nov 29, 2007 at 02:18 UTC ( [id://653746]=note: print w/replies, xml ) | Need Help?? |
I'd use HTML::TreeBuilder::XPath to find the nodes in question, then alter the values in the "DOM" and use methods from HTML::Tree to write the document back out. Regular expressions are a very fragile solution to the "how do I parse HTML" problem. -David
In Section
Seekers of Perl Wisdom
|
|