I'm trying to accomplish the same thing as seen here:
i.e. assuming you have a text like:
<p>something</p>
<!-- OPTIONAL -->
<p class="sdf"> some text</p>
<p> some other text</p>
<!-- OPTIONAL END -->
<p>The end</p>
What is the regex that would match:
<p class="sdf"> some text</p>
<p> some other text</p>
I've setup a live test here using:
<!-- OPTIONAL -->(.*?)<!-- OPTIONAL END -->
but it's not matching correctly. Also the accepted answer on the page didn't work for me. What am I missing?