{"_id":"regx","_rev":"7-a32a6c1e4e18baa99f4af47e71df01c2","name":"regx","description":"Tagged template string regular expression compiler.","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"regx","version":"1.0.0","description":"Tagged template string regular expression compiler.","main":"dist/regx.js","scripts":{"build":"browserify -t babelify -s regx src/regx.js -o dist/regx.js","pretest":"xo src/*.js test/*.js","test":"npm run test-node && npm run test-browser && nyc report","test-browser":"browserify -t babelify ./test/regx.js | browser-run | tap-difflet","test-node":"nyc -r lcov blue-tape test/regx.js | tap-difflet","watch":"watch 'npm test' src test -du"},"repository":{"type":"git","url":"https://github.com/shannonmoeller/regx"},"keywords":["compiler","expression","regex","regexp","regular","rx","string","tag","tagged","template"],"author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"license":"MIT","bugs":{"url":"https://github.com/shannonmoeller/regx/issues"},"homepage":"https://github.com/shannonmoeller/regx","devDependencies":{"babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-register":"^6.4.3","babelify":"^7.2.0","blue-tape":"^0.1.11","browser-run":"^3.0.8","browserify":"^13.0.0","nyc":"^5.5.0","tap-difflet":"^0.4.0","watch":"^0.17.1","xo":"^0.12.1"},"babel":{"presets":["es2015","stage-2"],"plugins":["transform-runtime"]},"nyc":{"require":["babel-register"]},"gitHead":"5967dedf1008f40fc8c34771996f378c3e3c7a55","_id":"regx@1.0.0","_shasum":"b2df76e99dc135ba34809c1f4590fc0944f7d2ec","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"shannonmoeller","email":"me@shannonmoeller.com"},"dist":{"shasum":"b2df76e99dc135ba34809c1f4590fc0944f7d2ec","tarball":"https://registry.npmjs.org/regx/-/regx-1.0.0.tgz","integrity":"sha512-XbaAuEcL46Ht4pyMGaKBC6oF70aUd51jGkSdV6ClMOJ0BhtPMo9wglnmyyIlLo8dU5tGbfeBHTwQfQ+Yy+I/hA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+HhqGeI+0LuDgUxRO2eZvLYqp7di+foOAdkcnPRP8oAiBkfpVpCmV4euUXtQlhMfKhiZd8PlMuhUmEnWrBcZKajQ=="}]},"maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/regx-1.0.0.tgz_1454519010117_0.0467848835978657"}},"1.0.1":{"name":"regx","version":"1.0.1","description":"Tagged template string regular expression compiler.","main":"dist/regx.js","scripts":{"build":"browserify -t babelify -s regx src/regx.js -o dist/regx.js","pretest":"xo src/*.js test/*.js","test":"npm run test-node && npm run test-browser && nyc report","test-browser":"browserify -t babelify ./test/regx.js | browser-run | tap-difflet","test-node":"nyc -r lcov blue-tape test/regx.js | tap-difflet","watch":"watch 'npm test' src test -du"},"repository":{"type":"git","url":"https://github.com/shannonmoeller/regx"},"keywords":["compiler","expression","regex","regexp","regular","rx","string","tag","tagged","template"],"author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"license":"MIT","bugs":{"url":"https://github.com/shannonmoeller/regx/issues"},"homepage":"https://github.com/shannonmoeller/regx","devDependencies":{"babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-register":"^6.4.3","babelify":"^7.2.0","blue-tape":"^0.1.11","browser-run":"^3.0.8","browserify":"^13.0.0","nyc":"^5.5.0","tap-difflet":"^0.4.0","watch":"^0.17.1","xo":"^0.12.1"},"babel":{"presets":["es2015","stage-2"],"plugins":["transform-runtime"]},"nyc":{"require":["babel-register"]},"gitHead":"626e1aaea64678be5e5f3f08f7ea423b9a25628c","_id":"regx@1.0.1","_shasum":"36030ab8a7bfbaa7c12b2e6ae685d93c2df0fb43","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"shannonmoeller","email":"me@shannonmoeller.com"},"dist":{"shasum":"36030ab8a7bfbaa7c12b2e6ae685d93c2df0fb43","tarball":"https://registry.npmjs.org/regx/-/regx-1.0.1.tgz","integrity":"sha512-6Ut383l4CxEHd/JM03DNqkQun7Kh07GyWt08xiDKukCwYuZNA3ddZW40UQ1sUSOMUqbQqXH6pop2WDeeJN6rkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKEXbhGBhNIIsDSrrFk6vnAVac7oeJpquUpCD2W8UPmQIhAPzMNMe6F+PeGt/4tbb1A8zugiMfMABqaVOsXFjpbsNo"}]},"maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/regx-1.0.1.tgz_1454519588889_0.5280117045622319"}},"1.0.2":{"name":"regx","version":"1.0.2","description":"Tagged template string regular expression compiler.","main":"dist/regx.js","scripts":{"build":"browserify -t babelify -s regx src/regx.js -o dist/regx.js","pretest":"xo src/*.js test/*.js","test":"npm run test-node && npm run test-browser && nyc report","test-browser":"browserify -t babelify ./test/regx.js | browser-run | tap-difflet","test-node":"nyc -r lcov blue-tape test/regx.js | tap-difflet","watch":"watch 'npm test' src test -du"},"repository":{"type":"git","url":"https://github.com/shannonmoeller/regx"},"keywords":["compiler","expression","regex","regexp","regular","rx","string","tag","tagged","template"],"author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"license":"MIT","bugs":{"url":"https://github.com/shannonmoeller/regx/issues"},"homepage":"https://github.com/shannonmoeller/regx","devDependencies":{"babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-register":"^6.4.3","babelify":"^7.2.0","blue-tape":"^0.1.11","browser-run":"^3.0.8","browserify":"^13.0.0","nyc":"^5.5.0","tap-difflet":"^0.4.0","watch":"^0.17.1","xo":"^0.12.1"},"babel":{"presets":["es2015","stage-2"],"plugins":["transform-runtime"]},"nyc":{"require":["babel-register"]},"gitHead":"d7a5e781d6444655d2a3b4d641bf58a43f4059b4","_id":"regx@1.0.2","_shasum":"86d15238f783963f1337e1d3716b042af6c82cb9","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"shannonmoeller","email":"me@shannonmoeller.com"},"dist":{"shasum":"86d15238f783963f1337e1d3716b042af6c82cb9","tarball":"https://registry.npmjs.org/regx/-/regx-1.0.2.tgz","integrity":"sha512-rojul0gbmbuzFPlbxUHvPjTVacWwG8zlkfvBh7aljj9+wbLLFv896XUWEUjRL/QIXSpiulQabTGiHiVB0Zjrjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpQzAEA6b7EmXqtwOJtR+iDbrbOZQDekvqNnUR2mogjQIgGP6LWiDBbm6k0n7z+8mPm6WeSvTaBaiHIsk831y3nak="}]},"maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/regx-1.0.2.tgz_1454519974631_0.7073693969286978"}},"1.0.3":{"name":"regx","version":"1.0.3","description":"Tagged template string regular expression compiler.","main":"dist/regx.js","scripts":{"build":"browserify -t babelify -s regx src/regx.js -o dist/regx.js","pretest":"xo src/*.js test/*.js","test":"npm run test-node && npm run test-browser && nyc report","test-browser":"browserify -t babelify ./test/regx.js | browser-run | tap-difflet","test-node":"nyc -r lcov blue-tape test/regx.js | tap-difflet","watch":"watch 'npm test' src test -du"},"repository":{"type":"git","url":"https://github.com/shannonmoeller/regx"},"keywords":["compiler","expression","regex","regexp","regular","rx","string","tag","tagged","template"],"author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"license":"MIT","bugs":{"url":"https://github.com/shannonmoeller/regx/issues"},"homepage":"https://github.com/shannonmoeller/regx","devDependencies":{"babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-register":"^6.4.3","babelify":"^7.2.0","blue-tape":"^0.1.11","browser-run":"^3.0.8","browserify":"^13.0.0","nyc":"^5.5.0","tap-difflet":"^0.4.0","watch":"^0.17.1","xo":"^0.12.1"},"babel":{"presets":["es2015","stage-2"],"plugins":["transform-runtime"]},"nyc":{"require":["babel-register"]},"gitHead":"89d110f4db3c1509678a380a99008b27e8c8a927","_id":"regx@1.0.3","_shasum":"8f83da4c3a0701320fa382f0a28fc6c3afcd42d3","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"shannonmoeller","email":"me@shannonmoeller.com"},"dist":{"shasum":"8f83da4c3a0701320fa382f0a28fc6c3afcd42d3","tarball":"https://registry.npmjs.org/regx/-/regx-1.0.3.tgz","integrity":"sha512-UtfiXqUyh76i/rwI/X+V/FA33foOTb1thn4TwAHVeg/07bYpgLsFSUWbvOgpwwEeCvKdtPFWBqpg/H8hcnfaNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdQClYzlT8QQTpqBvzB+m9Cn2rLjuYhNKOtJCe4xkXPAiAp9ABGrgIHX5Nrui5Hcdyu3KeAz6nQ7VYu15o2R4a+hw=="}]},"maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/regx-1.0.3.tgz_1454522887420_0.9045912155415863"}},"1.0.4":{"name":"regx","version":"1.0.4","description":"Tagged template string regular expression compiler.","main":"dist/regx.js","scripts":{"build":"browserify -t babelify -s regx src/regx.js -o dist/regx.js","pretest":"xo src/*.js test/*.js","test":"npm run test-node && npm run test-browser && nyc report","test-browser":"browserify -t babelify ./test/regx.js | browser-run | tap-difflet","test-node":"nyc -r lcov blue-tape test/*.js | tap-difflet","watch":"watch 'npm test' src test -du"},"repository":{"type":"git","url":"https://github.com/shannonmoeller/regx"},"keywords":["compiler","expression","regex","regexp","regular","rx","string","tag","tagged","template"],"author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"license":"MIT","bugs":{"url":"https://github.com/shannonmoeller/regx/issues"},"homepage":"https://github.com/shannonmoeller/regx","dependencies":{},"devDependencies":{"babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-register":"^6.4.3","babelify":"^7.2.0","blue-tape":"^0.1.11","browser-run":"^3.0.8","browserify":"^13.0.0","nyc":"^5.5.0","tap-difflet":"^0.4.0","watch":"^0.17.1","xo":"^0.12.1"},"babel":{"presets":["es2015","stage-2"],"plugins":["transform-runtime"]},"nyc":{"require":["babel-register"]},"gitHead":"34b22a68732c62e4c14cf092e6af98dbc5c74444","_id":"regx@1.0.4","_shasum":"a0ee32c308910902019ca1117ed41b9ddd041b2f","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"shannonmoeller","email":"me@shannonmoeller.com"},"dist":{"shasum":"a0ee32c308910902019ca1117ed41b9ddd041b2f","tarball":"https://registry.npmjs.org/regx/-/regx-1.0.4.tgz","integrity":"sha512-Z/5ochRUyD5TkJgFq+66ajKePlj6KzpSLfDO2lOLOLu7E82xAjNux0m8mx1DAXBj5ECHiRCBWoqL25b4lkwcgw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDELn8qZaTNE2t/HbI85hyLwfhXXM+MwPW2L0J6NAXL6AiBqcQn1bDs3D8cotZr2MsMiezGxociJtvKNtx2D83LPzw=="}]},"maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/regx-1.0.4.tgz_1454614348013_0.7594872564077377"}}},"readme":"# `regx`\n\n[![NPM version][npm-img]][npm-url] [![Downloads][downloads-img]][npm-url] [![Tip][amazon-img]][amazon-url]\n\nTagged template string [regular expression][guide] compiler. Supports multiline expressions, partials, and embedded comments.\n\n## Install\n\n    $ npm install --save regx\n\n## Example\n\n```js\nimport regx from 'regx';\n\n// RegExp partial to match opening block comment (flags ignored)\nconst openPartial = /\\/\\*\\*/i;\n\n// String partial to match closing block comment (extra escaping required)\nconst closePartial = '\\\\*\\\\/';\n\n// Time to write a human-readable expression\nconst expression = regx('gm')`\n    // Match a non-recursive block comment\n    (\n        // Must be first thing on a line\n        ^[\\t ]*\n\n        ${openPartial} // Block opener\n\n        // Capture content independently\n        (\n            // Match any character including newlines (non-greedy)\n            [\\s\\S]*?\n        )\n\n        ${closePartial} // Block closer\n    )\n\n    // Grab trailing newlines and discard them\n    [\\r\\n]*\n`;\n\n// The result is the same as if you had written the following\nconst expression = /(^[\\t ]*\\/\\*\\*([\\s\\S]*?)\\*\\/)[\\r\\n]*/gm;\n```\n\n## API\n\n### `regx([flags]) : regxTagFunction`\n\nCreates a template-string tag function. Optionally accepts RegExp [flags][flags].\n\n```js\nconst a = regx('gm')`\n    ^  // start of line\n    a+ // one or more 'a' characters\n    $  // end of line\n`; // result: /^a+$/gm\n```\n\n### `regxTagFunction(strings, ...values) : RegExp`\n\nThe functions returned by `regx()` may be cached and reused.\n\n```js\nconst rx = regx('gm');\n\nconst a = rx`\n    ^  // start of line\n    a+ // one or more 'a' characters\n    $  // end of line\n`; // result: /^a+$/gm\n\nconst b = rx`\n    ^  // start of line\n    b+ // one or more 'b' characters\n    $  // end of line\n`; // result: /^b+$/gm\n```\n\nAll whitespace at the beginning and end of each line is ignored. To match literal whitespace at the beginning or end of a line you must use a character set.\n\n```js\nconst rx = regx('i');\n\nconst spaceBefore = rx`\n    [ ]foo bar\n`; // result: /[ ]foo bar/i\n\nconst spaceAfter = rx`\n    foo bar[ ]\n`; // result: /foo bar[ ]/i\n```\n\n----\n\n© 2016 Shannon Moeller <me@shannonmoeller.com>\n\nLicensed under [MIT](http://shannonmoeller.com/mit.txt)\n\n[guide]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n[flags]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Advanced_searching_with_flags\n\n[amazon-img]:    https://img.shields.io/badge/amazon-tip_jar-yellow.svg?style=flat-square\n[amazon-url]:    https://www.amazon.com/gp/registry/wishlist/1VQM9ID04YPC5?sort=universal-price\n[downloads-img]: http://img.shields.io/npm/dm/regx.svg?style=flat-square\n[npm-img]:       http://img.shields.io/npm/v/regx.svg?style=flat-square\n[npm-url]:       https://npmjs.org/package/regx\n","maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"time":{"modified":"2022-06-26T10:48:41.736Z","created":"2016-02-03T17:03:34.244Z","1.0.0":"2016-02-03T17:03:34.244Z","1.0.1":"2016-02-03T17:13:11.860Z","1.0.2":"2016-02-03T17:19:37.663Z","1.0.3":"2016-02-03T18:08:10.533Z","1.0.4":"2016-02-04T19:32:29.344Z"},"homepage":"https://github.com/shannonmoeller/regx","keywords":["compiler","expression","regex","regexp","regular","rx","string","tag","tagged","template"],"repository":{"type":"git","url":"https://github.com/shannonmoeller/regx"},"author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"bugs":{"url":"https://github.com/shannonmoeller/regx/issues"},"license":"MIT","readmeFilename":"README.md"}