{"_id":"@builtbygio/oniguruma","name":"@builtbygio/oniguruma","dist-tags":{"latest":"7.2.3"},"versions":{"7.2.3":{"main":"./src/oniguruma.js","name":"@builtbygio/oniguruma","description":"oniguruma regular expression library","version":"7.2.3","licenses":[{"type":"MIT","url":"http://github.com/atom/node-oniguruma/raw/master/LICENSE.md"}],"repository":{"type":"git","url":"git+https://github.com/builtbygio/node-oniguruma.git"},"bugs":{"url":"https://github.com/builtbygio/node-oniguruma/issues"},"homepage":"https://github.com/builtbygio/node-oniguruma","keywords":["regex","regexp","re","regular expression","async"],"devDependencies":{"async":"~2.6.2","jasmine-focused":"~1.0.7"},"dependencies":{"nan":"2.28.0"},"scripts":{"test":"jasmine-focused --captureExceptions spec/","benchmark":"benchmark/benchmark.coffee","install":"node-gyp rebuild"},"engines":{"chevron":"*"},"gypfile":true,"_id":"@builtbygio/oniguruma@7.2.3","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-BmHHkNgj+hh2a3hg5x8aCXWLN7/uIcn76jevFgk9S3U3VU10q3Mk49P//QY+75f4Y725lSWcayk8JWXzJ3uMkA==","shasum":"943ee75541deb5342b3cfef6545835f5c174cb7f","tarball":"https://registry.npmjs.org/@builtbygio/oniguruma/-/oniguruma-7.2.3.tgz","fileCount":121,"unpackedSize":2732191,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDoHkD0gdPvUFgwutI4f9z5651lEmwy/iDYiFG2SXRCpAiBb3Q8dkAS6tdZktBnmzyTwPddbL5mK0J6lPjv3BHDfQA=="}]},"_npmUser":{"name":"giobuilds","email":"giova19@proton.me"},"directories":{},"maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/oniguruma_7.2.3_1787781658707_0.4701583954717825"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T22:00:58.449Z","7.2.3":"2026-08-26T22:00:58.971Z","modified":"2026-08-26T22:00:59.417Z"},"maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"description":"oniguruma regular expression library","homepage":"https://github.com/builtbygio/node-oniguruma","keywords":["regex","regexp","re","regular expression","async"],"repository":{"type":"git","url":"git+https://github.com/builtbygio/node-oniguruma.git"},"bugs":{"url":"https://github.com/builtbygio/node-oniguruma/issues"},"readme":"# Oniguruma Node module\n[![CI](https://github.com/atom/node-oniguruma/actions/workflows/ci.yml/badge.svg)](https://github.com/atom/node-oniguruma/actions/workflows/ci.yml)\n\nNative Node bindings to the Oniguruma regular expressions library.\n\nRead all about Oniguruma regular expressions [here](https://github.com/kkos/oniguruma/blob/master/doc/RE).\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 `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","readmeFilename":"README.md","_rev":"1-ff9fd11d4da8761229156294052663da"}