pcremu
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

PCREmu

Build Status

PCRE emulation for JavaScript.

Usage

Example usage if consuming from outside an ES module:

$ npm i pcremu
const pcremu = require('pcremu').default;

// Create a matcher for your regex.
const matcher = pcremu.compile('^something');

// Match the regex against your input string.
const match = matcher.matchOne('something here');

console.log(match.getCaptureCount()); // Outputs "1".
console.log(match.getLength()); // Outputs "9" (the length of the word "something").

See also

Readme

Keywords

Package Sidebar

Install

npm i pcremu

Weekly Downloads

73

Version

0.0.4

License

MIT

Unpacked Size

486 kB

Total Files

194

Last publish

Collaborators

  • asmblah