{"_id":"alexandrudima-oniguruma","_rev":"717909","name":"alexandrudima-oniguruma","description":"oniguruma regular expression library","dist-tags":{"latest":"6.0.3"},"maintainers":[{"name":"alexandrudima","email":"alexdima@microsoft.com"}],"time":{"modified":"2026-11-08T23:35:02.000Z","created":"2015-12-06T21:03:56.377Z","6.0.3":"2016-01-29T01:19:48.824Z","6.0.2":"2016-01-28T23:59:58.817Z","6.0.1":"2015-12-07T09:48:18.299Z","6.0.0":"2015-12-06T21:03:56.377Z"},"users":{},"repository":{"type":"git","url":"https://github.com/atom/node-oniguruma.git"},"versions":{"6.0.3":{"main":"./lib/oniguruma.js","name":"alexandrudima-oniguruma","description":"oniguruma regular expression library","version":"6.0.3","licenses":[{"type":"MIT","url":"http://github.com/atom/node-oniguruma/raw/master/LICENSE.md"}],"repository":{"type":"git","url":"https://github.com/atom/node-oniguruma.git"},"bugs":{"url":"https://github.com/atom/node-oniguruma/issues"},"homepage":"http://atom.github.io/node-oniguruma","keywords":["regex","regexp","re","regular expression","async"],"devDependencies":{"async":"~0.9.0","coffee-script":"~1.9.1","coffeelint":"~1.9.2","grunt":"~0.4.5","grunt-cli":"~0.1.13","grunt-coffeelint":"0.0.13","grunt-contrib-coffee":"~0.13.0","grunt-shell":"~1.1.2","jasmine-focused":"~1.0.7","node-cpplint":"~0.4.0"},"dependencies":{"nan":"^2.0.9"},"scripts":{"prepublish":"grunt publish","test":"grunt test","benchmark":"benchmark/benchmark.coffee","install":"node-gyp rebuild"},"gypfile":true,"gitHead":"d5b2d4171e1f61d7f9ae00cf50c91e3966301239","_id":"alexandrudima-oniguruma@6.0.3","_shasum":"08bb98e5333d4f8bf97f2f1796017650fc82c2da","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"alexandrudima","email":"alexdima@microsoft.com"},"dist":{"shasum":"08bb98e5333d4f8bf97f2f1796017650fc82c2da","tarball":"http://registry-npm.ywwl.com/alexandrudima-oniguruma/download/alexandrudima-oniguruma-6.0.3.tgz","integrity":"sha512-hHkfU3EH302WvUJ6OUI5p46GbLMpxIyhx4ZYu93usT7DjWTVurLPC7YEzqU2FpgkNsWxTsUqRtUYwlXbnhm/eQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZhpoQK8R28EP6gkmtStnaULAI1zW85PMOLfSokfef4QIhAIPigfPvc6O7mgoSk+UWqPEtgDHMab0qnHY+gXK+Ed9l"}],"size":583806,"noattachment":false,"key":"/alexandrudima-oniguruma/-/alexandrudima-oniguruma-6.0.3.tgz"},"maintainers":[{"name":"alexandrudima","email":"alexdima@microsoft.com"}],"directories":{},"publish_time":1454030388824,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1454030388824},"6.0.2":{"main":"./lib/oniguruma.js","name":"alexandrudima-oniguruma","description":"oniguruma regular expression library","version":"6.0.2","licenses":[{"type":"MIT","url":"http://github.com/atom/node-oniguruma/raw/master/LICENSE.md"}],"repository":{"type":"git","url":"https://github.com/atom/node-oniguruma.git"},"bugs":{"url":"https://github.com/atom/node-oniguruma/issues"},"homepage":"http://atom.github.io/node-oniguruma","keywords":["regex","regexp","re","regular expression","async"],"devDependencies":{"async":"~0.9.0","coffee-script":"~1.9.1","coffeelint":"~1.9.2","grunt":"~0.4.5","grunt-cli":"~0.1.13","grunt-coffeelint":"0.0.13","grunt-contrib-coffee":"~0.13.0","grunt-shell":"~1.1.2","jasmine-focused":"~1.0.7","node-cpplint":"~0.4.0"},"dependencies":{"nan":"^2.0.9"},"scripts":{"prepublish":"grunt publish","test":"grunt test","benchmark":"benchmark/benchmark.coffee","install":"node-gyp rebuild"},"gypfile":true,"gitHead":"6eaf7b0ea61d60518ab85dfb022804c3871b1beb","_id":"alexandrudima-oniguruma@6.0.2","_shasum":"15d414843cde58ce70d1291ad1335136a08ece83","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"alexandrudima","email":"alexdima@microsoft.com"},"dist":{"shasum":"15d414843cde58ce70d1291ad1335136a08ece83","tarball":"http://registry-npm.ywwl.com/alexandrudima-oniguruma/download/alexandrudima-oniguruma-6.0.2.tgz","integrity":"sha512-kGXGYWiDk/SarzBw0Rv5puSJzR3CL+OOIObW9XEJ0lBie6jUDbJLrD2WGoe8DZ3gA0solzLAnMrjO+xoPXISHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqWGMAWzLzdnHD6PTtMfPBAe8CeRwcQ1AAc9N1A/DnBQIhAP7KGm3ZN0uats1mQSyuEPAugeQ8rVXp+YRV7PW4zgbh"}],"size":583786,"noattachment":false,"key":"/alexandrudima-oniguruma/-/alexandrudima-oniguruma-6.0.2.tgz"},"maintainers":[{"name":"alexandrudima","email":"alexdima@microsoft.com"}],"directories":{},"publish_time":1454025598817,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1454025598817},"6.0.1":{"main":"./lib/oniguruma.js","name":"alexandrudima-oniguruma","description":"oniguruma regular expression library","version":"6.0.1","licenses":[{"type":"MIT","url":"http://github.com/atom/node-oniguruma/raw/master/LICENSE.md"}],"repository":{"type":"git","url":"https://github.com/atom/node-oniguruma.git"},"bugs":{"url":"https://github.com/atom/node-oniguruma/issues"},"homepage":"http://atom.github.io/node-oniguruma","keywords":["regex","regexp","re","regular expression","async"],"devDependencies":{"async":"~0.9.0","coffee-script":"~1.9.1","coffeelint":"~1.9.2","grunt":"~0.4.5","grunt-cli":"~0.1.13","grunt-coffeelint":"0.0.13","grunt-contrib-coffee":"~0.13.0","grunt-shell":"~1.1.2","jasmine-focused":"~1.0.7","node-cpplint":"~0.4.0"},"dependencies":{"nan":"^2.0.9"},"scripts":{"prepublish":"grunt publish","test":"grunt test","benchmark":"benchmark/benchmark.coffee","install":"node-gyp rebuild"},"gypfile":true,"gitHead":"204a228a03d28b715a35e8d2714658096099333e","_id":"alexandrudima-oniguruma@6.0.1","_shasum":"8de79d05c8b58a4735ed4eb48803d5a5f235a5a3","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"alexandrudima","email":"alexdima@microsoft.com"},"dist":{"shasum":"8de79d05c8b58a4735ed4eb48803d5a5f235a5a3","tarball":"http://registry-npm.ywwl.com/alexandrudima-oniguruma/download/alexandrudima-oniguruma-6.0.1.tgz","integrity":"sha512-a0j4/BQGnZcqR+SYKVhCbZdM6yvqaCajNTbUenfPnkFV2mfBqh5I3kRwc3IfFb2dXS6PG6jkXLMbZe9541FOYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnkW+u23CQZ0Ji69gh3nf81XUxaw39oT8X0ISjq1TFsgIhAM085JL0aUfzd3Dm7wO74r42+tMZmuIiF/LPoRxBqUNX"}],"size":584032,"noattachment":false,"key":"/alexandrudima-oniguruma/-/alexandrudima-oniguruma-6.0.1.tgz"},"maintainers":[{"name":"alexandrudima","email":"alexdima@microsoft.com"}],"directories":{},"publish_time":1449481698299,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1449481698299},"6.0.0":{"main":"./lib/oniguruma.js","name":"alexandrudima-oniguruma","description":"oniguruma regular expression library","version":"6.0.0","licenses":[{"type":"MIT","url":"http://github.com/atom/node-oniguruma/raw/master/LICENSE.md"}],"repository":{"type":"git","url":"https://github.com/atom/node-oniguruma.git"},"bugs":{"url":"https://github.com/atom/node-oniguruma/issues"},"homepage":"http://atom.github.io/node-oniguruma","keywords":["regex","regexp","re","regular expression","async"],"devDependencies":{"async":"~0.9.0","coffee-script":"~1.9.1","coffeelint":"~1.9.2","grunt":"~0.4.5","grunt-cli":"~0.1.13","grunt-coffeelint":"0.0.13","grunt-contrib-coffee":"~0.13.0","grunt-shell":"~1.1.2","jasmine-focused":"~1.0.7","node-cpplint":"~0.4.0"},"dependencies":{"nan":"^2.0.9"},"scripts":{"prepublish":"grunt publish","test":"grunt test","benchmark":"benchmark/benchmark.coffee","install":"node-gyp rebuild"},"gypfile":true,"gitHead":"3da7f20b5a1084f6df1201c4808e9135ffab609e","_id":"alexandrudima-oniguruma@6.0.0","_shasum":"66d4b9efc5a1f78b3b0eb49113b0b86c75721bca","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"alexandrudima","email":"alexdima@microsoft.com"},"dist":{"shasum":"66d4b9efc5a1f78b3b0eb49113b0b86c75721bca","tarball":"http://registry-npm.ywwl.com/alexandrudima-oniguruma/download/alexandrudima-oniguruma-6.0.0.tgz","integrity":"sha512-vECVXK2YIgPTffLIdLMdlbzKQR8a0y3/V1vN0GbMstvibj1jwdKGBtlWEBigkaM83KzN0pzdrlMyTRH84DlY1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrUixo83TZ5rvR+ZdhVPbEKoi+PQWlMcnelbDfskyM6AIgP8ZlPfkSwolJ4nQ18xkbtuJ1aamBNvL7dZaECp16OIQ="}],"size":584038,"noattachment":false,"key":"/alexandrudima-oniguruma/-/alexandrudima-oniguruma-6.0.0.tgz"},"maintainers":[{"name":"alexandrudima","email":"alexdima@microsoft.com"}],"directories":{},"publish_time":1449435836377,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1449435836377}},"readme":"# Oniguruma Node module [![Build Status](https://travis-ci.org/atom/node-oniguruma.svg?branch=master)](https://travis-ci.org/atom/node-oniguruma)\n\nNative Node bindings to the Oniguruma regular expressions library.\n\nRead all about Oniguruma regular expressions [here](http://oniguruma.rubyforge.org/oniguruma/files/Syntax_txt.html).\n\nVersion 2.0 of this library added an asynchronous API, the old synchronous\nmethods have been renamed to have a `Sync` suffix.\n\n## Installing\n\n```sh\nnpm install oniguruma\n```\n\n## Building\n  * Clone the repository\n  * Run `npm install`\n  * Run `grunt` to compile the CoffeeScript and native code\n  * Run `npm test` to run the specs\n\n## Using\n\n```coffeescript\n{OnigRegExp, OnigScanner} = require 'oniguruma'\n```\n\n### OnigScanner(patterns)\n\nCreate a new scanner with the given patterns.\n\n`patterns` - An array of string patterns.\n\n### OnigScanner::findNextMatch(string, startPosition, callback)\n\nFind the next match from a given position.\n\n`string` - The string to search.\n\n`startPosition` - The optional position to start at, defaults to `0`.\n\n`callback` - The `(error, match)` function to call when done, `match` will\nnull when there is no match.\n\n#### Example\n\n```coffeescript\nscanner = new OnigScanner(['c', 'a(b)?'])\nscanner.findNextMatch 'abc', (error, match) ->\n  console.log match\n  {\n    index: 1,  # Index of the best pattern match\n    captureIndices: [\n      {index: 0, start: 0, end: 2, length: 2},  # Entire match\n      {index: 1, start: 1, end: 2, length: 1}   # Match of first capture group\n    ]\n  }\n```\n\n### OnigScanner::findNextMatchSync(string, startPosition)\n\nSynchronously find the next match from a given position.\n\n`string` - The string to search.\n\n`startPosition` - The optional position to start at, defaults to `0`.\n\nReturns an object containing details about the match or `null` if no match.\n\n#### Example\n\n```coffeescript\nscanner = new OnigScanner(['c', 'a(b)?'])\nmatch = scanner.findNextMatchSync('abc')\nconsole.log match\n{\n  index: 1,  # Index of the best pattern match\n  captureIndices: [\n    {index: 0, start: 0, end: 2, length: 2},  # Entire match\n    {index: 1, start: 1, end: 2, length: 1}   # Match of first capture group\n  ]\n}\n```\n\n### OnigRegExp(pattern)\n\nCreate a new regex with the given pattern.\n\n`pattern` - A string pattern.\n\n### OnigRegExp::search(string, startPosition, callback)\n\nSearch the string for a match starting at the given position.\n\n`string` - The string to search.\n\n`startPosition` - The optional position to start the search at, defaults to `0`.\n\n`callback` - The `(error, match)` function to call when done, `match` will be\nnull if no matches were found. `match` will be an array of objects for each\nmatched group on a successful search.\n\n#### Example\n\n```coffeescript\nregex = new OnigRegExp('a([b-d])c')\nregex.search '!abcdef', (error, match) ->\n  console.log match\n  [\n    {index: 0, start: 1, end: 4, match: 'abc', length: 3}, # Entire match\n    {index: 1, start: 2, end: 3, match: 'b', length: 1}    # Match of first capture group\n  ]\n```\n\n### OnigRegExp::searchSync(string, startPosition)\n\nSynchronously search the string for a match starting at the given position.\n\n`string` - The string to search.\n\n`startPosition` - The optional position to start the search at, defaults to `0`.\n\nReturns an array of objects for each matched group or `null` if no match was\nfound.\n\n#### Example\n\n```coffeescript\nregex = new OnigRegExp('a([b-d])c')\nmatch = regex.searchSync('!abcdef')\nconsole.log match\n[\n  {index: 0, start: 1, end: 4, match: 'abc', length: 3}, # Entire match\n  {index: 1, start: 2, end: 3, match: 'b', length: 1}    # Match of first capture group\n]\n```\n\n### OnigRegExp::test(string, callback)\n\nTest if this regular expression matches the given string.\n\n`string` - The string to test against.\n\n`callback` - The `(error, matches)` function to call when done, `matches` will\nbe `true` if at least one match is found, `false` otherwise.\n\n#### Example\n\n```coffeescript\nregex = new OnigRegExp('a([b-d])c')\nregex.test 'abcdef', (error, matches) ->\n  console.log matches # true\n```\n\n### OnigRegExp::testSync(string)\n\nSynchronously test if this regular expression matches the given string.\n\n`string` - The string to test against.\n\nReturns `true` if at least one match, `false` otherwise.\n\n#### Example\n\n```coffeescript\nregex = new OnigRegExp('a([b-d])c')\nmatches = regex.testSync('abcdef')\nconsole.log matches # true\n```\n","_attachments":{},"homepage":"http://atom.github.io/node-oniguruma","bugs":{"url":"https://github.com/atom/node-oniguruma/issues"}}