Think about Loose Coupling | |
PerlMonks |
Re: Stripping of HTML contentby Molt (Chaplain) |
on Sep 12, 2002 at 16:10 UTC ( [id://197261]=note: print w/replies, xml ) | Need Help?? |
Look at a HTML Parser, either HTML::Parser itself or (even more simply) HTML::TokeParser. Your regexps are fragile, they will break.. try feeding <img src="this.gif" alt="<<THIS>>"> into it, watch it fall over screaming. If you want a nice full description of HTML parsing, if this is going to be something you're doing a lot of, then peer into 'Perl and LWP' by O'Reilly.
In Section
Seekers of Perl Wisdom
|
|