There's more than one way to do things | |
PerlMonks |
Re: Matching set of paragraph tags with string inside.by Tanktalus (Canon) |
on Feb 08, 2008 at 21:10 UTC ( [id://667069]=note: print w/replies, xml ) | Need Help?? |
If your HTML is actually XHTML-compliant, you could use XML::Twig to parse it, and then do something like this: Note that if you have p's in p's (e.g., "<p>some text<p>inner [tag] stuff</p>outter</p>", this may give you problems (you'll get both "some textinner [tag] stuffoutter" and "inner [tag] stuff", I believe).
In Section
Seekers of Perl Wisdom
|
|