Skip to content

SonahtQ/pcre2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

A pcre2 binding for node.js with UTF8 and Unicode properties support. Same API as RegExp class! But with bunch of new features like negative/positive lookbehind.

Requirements

  • node.js -- v4 or newer
  • Linux, or OSX (currently not Windows)

Install

git submodule update --init
npm install pcre2

USAGE

var PCRE2 = require("pcre2").PCRE2;
var PCRE2JIT = require("pcre2").PCRE2JIT; //better performance, longer regex compiling, usually you dont need this class instead of first one.

var re = new PCRE2("^(abc|123)+$", "gi");
var output = re.exec("abc123abc123");

//output is:
//Array[2]:
//   0:"abc123abc123"
//   1:"123"
//   index:0
//   input:"abc123abc123"

API

Same as v8's RegExp Plus extra modifiers and syntax, see: https://github.com/jpcre2/jpcre2

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published