tree: 549804eaacf6d14d071345fe8bf01d2f8372b3c4 [path history] [tgz]
  1. index.js
  2. LICENSE
  3. package.json
  4. README.md
node_modules/html-comment-regex/README.md

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