Say I have a html doc like so:
<!--FOO-->
some text
<!--BAR-->
some other text
<!--FOO-->
some more text
<!--BAR-->
How can I write a javascript regex that matches both cases of
<!--FOO-->anytext<!--BAR-->
but not the text in between ('some other text' in this case).
My regex that I thought would work is
/<!--FOO-->(.|\n)*<!--BAR-->/
but it catches the 'some other text' as well.