I have the following HTML string in variable "myhtml":
<html><head><title>hackaday</title></head><body>
<span background-color="#0000">Welcome to the world.</span><div>You want a little treat...tomatoes berries walnutsDont You? <a href="http://getyourtreat.com">Get Your Treat</a> You will enjoy it. Eat It. Love it.</div></body></html>
What I want to extract from this html string is "tomatoes berries walnuts". Note that every time I refresh the HTML page, there may be different words that show up instead of "tomatoes berries walnuts" like "chocolate chips soda".
What is the absolute fastest way to extract the string I am looking for? My current solution is to use a split on the "..." to get everything after, then use another split on the word "Dont" since nothing on that page changes except for those specific three words.
Is there a smarter/faster solution?
via Rolando
No comments:
Post a Comment