In this script I've written, I use my own tags in HTML pages, such as <template></template> to denote sections that should be replaced with something else. Prior to outputting the original HTML, I do the replace by doing a pretty ugly search through the file looking for my special tags.
Since this seems like it might be a pretty common thing to do, I was wondering if anyone knew of a quicker way to parse the page looking for HTML tags. And another problem is that there could be multiple such tag sets in the page.
Thanks for suggestions,
Karim