html-comment-regex

v1.1.2
Regular expression for matching HTML comments
html-comment-regex text string regex regexp re match test find and 7 more...

NPM version Build Status

Regular expression for matching HTML comments

Install

$ npm install --save html-comment-regex

Usage

var htmlCommentRegex = require('html-comment-regex');

htmlCommentRegex.test('<!DOCTYPE html><!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body></body></html>');
//=> true

htmlCommentRegex.test('<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body></body></html>');
//=> false

License

MIT © Steve Mao

npm i html-comment-regex

Metadata

  • MIT
  • Whatever
  • Steve Mao
  • released 10/9/2018

Downloads

Maintainers