I am trying to strip out code between some tags. Its from a JavaScript plugin and it has multiple occurencies.
For example:
/*<ltIE8>*/ ╗
if (!item.hasOwnProperty) return false; ╣ this should match / go away
/*</ltIE8>*/ ╝
return item instanceof object; // this should not go away/match
...
/*<ltIE8>*/ ╗
if (!window.addEvenetListener) return false; ╣ this should match / go away
/*</ltIE8>*/ ╝
return window.addEvent;
I would like to match/remove those two blocks.
Tried using lookaheads like \/\*<ltIE8>\*\/(?!=\/\*<\/ltIE8>\*\/)([\s\S]+) but it ends up matching from the first ocurrence to the last, and missing the ones in-between.
Example: https://regex101.com/r/iD6mL8/1
Any sugestions? (I will be doing these replacements using JavaScript/NodeJS).