I have to create a regex which will match anything (including line breaks) between 2 html specific comment tags. Here is an example for some html:
<!-- build-remove-start -->
<!-- bower:js -->
<script src="../bower_components/jquery/dist/jquery.js"></script>
<!-- endbower -->
<!-- build-remove-end -->
<!-- inject:vendor:js -->
<!-- endinject -->
I would like to match every thing between <!-- build-remove-start --> and <!-- build-remove-end --> not including the comment tags (I mean not to remove the comments tags, only what's inside).
I have tried:
<!-- build-remove-start -->[\s\S]<!-- build-remove-end -->
But it doesn't work.
Here is a link to test the regex:
https://regex101.com/r/rV0qG2/2