Hi,
I need a little help with a regular expression. I'm loading an html page into a string and searching through the string to replace sections of code.
Example page to search:
<html>
<body>
<!-- area_start name="one" -->blar blar blar</h1><!-- area_end -->
<!-- area_start name="two" --><p>blar blar blar.</p><!-- area_end -->
<!-- area_start name="three" --><p>blar blar blar.</p><!-- area_end -->
</body>
</html>
I would like to search through the page for '<!-- area_start name="one" -->', followed by any radom text, followed by the first instance of '<!-- area_end -->'
My current regualar expression finds the first part and the random text but matches the last instance of '<!-- area_end -->' instead of the first.
I am cuurently using "(<!-- area_start name=\"one\" -->.*(<!-- area_end -->)$";
How do I get it to match just "<!-- area_start name="one" -->blar blar blar</h1><!-- area_end -->" and not all sections at once?
Thanks
Ben.