I have a long line like this:
<div class="interesting">This is interesting1</div><div class="not interesting">Some text</div><div class="interesting">This is interesting2</div><div class="not interesting">Some more text</div>
How can I extract the following:
This is interesting1
This is interesting2
from the above text using grep? Any suggestions?
cat temp | grep -o "<div class=\"interesting\">.*?</div>"
does not seem to be giving out anything.
Parenthesis match the items items inside that html tag.