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

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