{"_id":"regex-regex","_rev":"4087246","name":"regex-regex","description":"Regular expression to parse a regular expression string.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"time":{"modified":"2025-12-02T22:11:51.000Z","created":"2015-08-25T08:05:20.599Z","1.0.0":"2015-08-25T08:05:39.642Z","0.0.0":"2015-08-25T08:05:20.599Z"},"users":{},"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"repository":{"type":"git","url":"git://github.com/kgryte/regex-regex.git"},"versions":{"1.0.0":{"name":"regex-regex","version":"1.0.0","description":"Regular expression to parse a regular expression string.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","codecov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/codecov/coverage --report lcovonly -- -R spec && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/kgryte/regex-regex.git"},"keywords":["regex","regexp","regular","expression","string","pattern","flags"],"bugs":{"url":"https://github.com/kgryte/regex-regex/issues"},"dependencies":{},"devDependencies":{"chai":"3.x.x","codecov.io":"^0.1.5","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"2.x.x","mocha":"2.x.x"},"license":"MIT","gitHead":"faddd6553544767f61fee6d24960fa9c7c427939","homepage":"https://github.com/kgryte/regex-regex#readme","_id":"regex-regex@1.0.0","_shasum":"9048a1eaeb870f4d480dabc76fc42cdcc0bc3a72","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"9048a1eaeb870f4d480dabc76fc42cdcc0bc3a72","size":2542,"noattachment":false,"key":"/regex-regex/-/regex-regex-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/regex-regex/download/regex-regex-1.0.0.tgz"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"directories":{},"publish_time":1440489939642,"_hasShrinkwrap":false,"_cnpm_publish_time":1440489939642,"_cnpmcore_publish_time":"2021-12-17T02:00:21.794Z"},"0.0.0":{"name":"regex-regex","version":"0.0.0","description":"Regular expression to parse a regular expression string.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","codecov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/codecov/coverage --report lcovonly -- -R spec && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/kgryte/regex-regex.git"},"keywords":["regex","regexp","regular","expression","string","pattern","flags"],"bugs":{"url":"https://github.com/kgryte/regex-regex/issues"},"dependencies":{},"devDependencies":{"chai":"3.x.x","codecov.io":"^0.1.5","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"2.x.x","mocha":"2.x.x"},"license":"MIT","gitHead":"09226048ab1bc3104ab9a4c595742dd948dcf4aa","homepage":"https://github.com/kgryte/regex-regex#readme","_id":"regex-regex@0.0.0","_shasum":"c77a9f7b68395a7d9996d5829d06258f90718703","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"c77a9f7b68395a7d9996d5829d06258f90718703","size":2538,"noattachment":false,"key":"/regex-regex/-/regex-regex-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/regex-regex/download/regex-regex-0.0.0.tgz"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"directories":{},"publish_time":1440489920599,"_hasShrinkwrap":false,"_cnpm_publish_time":1440489920599,"_cnpmcore_publish_time":"2021-12-17T02:00:22.136Z"}},"readme":"RegExp String\n===\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependencies][dependencies-image]][dependencies-url]\n\n> [Regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) to parse a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) string.\n\n\n## Installation\n\n``` bash\n$ npm install regex-regex\n```\n\n\n## Usage\n\n``` javascript\nvar re = require( 'regex-regex' );\n```\n\n#### re\n\n[Regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) to parse a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) string. \n\n``` javascript\nvar bool = re.test( '/^beep$/' );\n// returns true\n\nbool = re.test( '' );\n// returns false\n```\n\n[Regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) strings should be escaped.\n\n``` javascript\nbool = re.test( '/^\\/([^\\/]+)\\/(.*)$/' );\n// returns false\n\nbool = re.test( '/^\\\\/([^\\\\/]+)\\\\/(.*)$/' );\n// returns true\n```\n\n\n## Examples\n\n``` javascript\nvar re = require( 'regex-regex' );\n\nconsole.log( re.test( '/beep/' ) );\n// returns true\n\nconsole.log( re.test( '/^.*$/ig' ) );\n// returns true\n\nconsole.log( re.test( '/^\\\\/([^\\\\/]+)\\\\/(.*)$/' ) );\n// returns true\n\nconsole.log( re.test( '/^\\/([^\\/]+)\\/(.*)$/' ) );\n// returns false\n\nconsole.log( re.test( '/boop' ) );\n// returns false\n\nconsole.log( re.test( '' ) );\n// returns false\n```\n\nTo run the example code from the top-level application directory,\n\n``` bash\n$ node ./examples/index.js\n```\n\n\n## Tests\n\n### Unit\n\nUnit tests use the [Mocha](http://mochajs.org/) test framework with [Chai](http://chaijs.com) assertions. To run the tests, execute the following command in the top-level application directory:\n\n``` bash\n$ make test\n```\n\nAll new feature development should have corresponding unit tests to validate correct functionality.\n\n\n### Test Coverage\n\nThis repository uses [Istanbul](https://github.com/gotwarlost/istanbul) as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-cov\n```\n\nIstanbul creates a `./reports/coverage` directory. To access an HTML version of the report,\n\n``` bash\n$ make view-cov\n```\n\n\n---\n## License\n\n[MIT license](http://opensource.org/licenses/MIT).\n\n\n## Copyright\n\nCopyright &copy; 2015. Athan Reines.\n\n\n[npm-image]: http://img.shields.io/npm/v/regex-regex.svg\n[npm-url]: https://npmjs.org/package/regex-regex\n\n[travis-image]: http://img.shields.io/travis/kgryte/regex-regex/master.svg\n[travis-url]: https://travis-ci.org/kgryte/regex-regex\n\n[codecov-image]: https://img.shields.io/codecov/c/github/kgryte/regex-regex/master.svg\n[codecov-url]: https://codecov.io/github/kgryte/regex-regex?branch=master\n\n[dependencies-image]: http://img.shields.io/david/kgryte/regex-regex.svg\n[dependencies-url]: https://david-dm.org/kgryte/regex-regex\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/kgryte/regex-regex.svg\n[dev-dependencies-url]: https://david-dm.org/dev/kgryte/regex-regex\n\n[github-issues-image]: http://img.shields.io/github/issues/kgryte/regex-regex.svg\n[github-issues-url]: https://github.com/kgryte/regex-regex/issues\n","_attachments":{},"homepage":"https://github.com/kgryte/regex-regex#readme","bugs":{"url":"https://github.com/kgryte/regex-regex/issues"},"license":"MIT"}