en.javascript.info/5-regular-expressions/08-regexp-greedy-and-lazy/3-find-html-comments/task.md
Ilya Kantor 455d300d8d renames
2017-05-25 11:56:32 +03:00

13 lines
232 B
Markdown

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