K
kw
Is there a relatively simple way to strip/delete all text from a file,
up to a keyword? It has to work around linefeeds. I have the webpage
stored in a text variable. Basically I want to remove a bunch of
useless text, ads, scripts, etc from webpage html, and have the
important text content as the result...
$webpage=get_webpage("http://news.yahoo.com/news?tmpl=index&cid=716");
#done
$webpage=strip_html($webpage); #done
$webpage=strip_text_up_to("Top Stories",$webpage);
$webpage=strip_text_after("Top Stories Section",$webpage);
-note, my perl skills are pretty limited so a more simplistic approach
would help me
-note, I've searched and can't find anything to do this, if it exists
already please point me to it
Thanks!
up to a keyword? It has to work around linefeeds. I have the webpage
stored in a text variable. Basically I want to remove a bunch of
useless text, ads, scripts, etc from webpage html, and have the
important text content as the result...
$webpage=get_webpage("http://news.yahoo.com/news?tmpl=index&cid=716");
#done
$webpage=strip_html($webpage); #done
$webpage=strip_text_up_to("Top Stories",$webpage);
$webpage=strip_text_after("Top Stories Section",$webpage);
-note, my perl skills are pretty limited so a more simplistic approach
would help me
-note, I've searched and can't find anything to do this, if it exists
already please point me to it
Thanks!