I attempted to research and write this expression myself, but alas, I gave up. I could never get a hold of RegEx. :) Ultimately, I want to clean up a large batch of HTML files. I would need two sets of expressions:
- I want to select code that starts with
<!DOCTYPE
and ends with<div id="content">
- I also want to also select code that starts with
</div><!-- end content -->
and ends with</html>
How would you write out these expressions?