232 B
232 B
Find HTML comments
Find all HTML comments in the text:
let reg = /your regexp/g;
let str = `... <!-- My -- comment
test --> .. <!----> ..
`;
alert( str.match(reg) ); // '<!-- My -- comment \n test -->', '<!---->'