en.javascript.info/9-regular-expressions/10-regexp-greedy-and-lazy/3-find-html-comments/task.md
Ilya Kantor f21cb0a2f4 WIP
2019-09-04 15:44:48 +03:00

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 -->', '<!---->'