0.1.1 • Published 6 years ago

@regexp-extra/html-comment v0.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

RegExp for matching HTML comment.

const HTML_COMMENT = require('@regexp-extra/html-comment');
// -> regular expression (global)


HTML_COMMENT.test('<button>lucky</button>');
// false

var str = '<button><!--feeling --><!--very -->lucky</button>';
HTML_COMMENT.test(str);
// true

str.match(HTML_COMMENT);
// [ '<!--feeling -->', '<!--very -->' ]

new RegExp(HTML_COMMENT).exec(str);
// [ '<!--feeling -->',
//   'feeling ',
//   index: 8,
//   input: '<button><!--feeling --><!--very -->lucky</button>',
//   groups: undefined ]

NPM

credits: taken directly from stevemao/html-comment-regex.

0.1.1

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago