1.0.0 • Published 9 years ago

script-regex v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

script-regex Build Status

Regular expression for matching script tags

Install

$ npm install --save script-regex

Usage

var scriptRegex = require('script-regex');

scriptRegex().test('<script>console.log(\'asd\')</script>');
//=> true

'<script>console.log(\'asd\')</script> asd'.match(scriptRegex());
//=> ['<script>console.log(\'asd\')</script>'']

API

scriptRegex()

Returns a regex for matching script tags.

License

MIT © Kevin Mårtensson