On Jan 3, 2008 6:19 AM, howa <[EMAIL PROTECTED]> wrote:
> e.g.
>
> <div>apple </div> <div> orange </div>
> <div stlye='...'>apple </div> <div> orange </div>
>
>
> I want to extract "div" from the input
>
> thanks.

Take a look at the various HTML* modules on CPAN.  Personally, I like
HTML::TreeBuilder*.  It represents the HTML document as a tree of
HTML::Elements.  If all you want is to extract the div tags then a
streaming parser like HTML::Parser* would probably be more suitable.

* http://search.cpan.org/search?query=HTML
* http://search.cpan.org/dist/HTML-Tree/lib/HTML/Tree.pm
* http://search.cpan.org/dist/HTML-Parser/Parser.pm

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to