-
-
Notifications
You must be signed in to change notification settings - Fork 59
Home
🔍 Search this wiki — ranked, deep-linked search via wiki-search; install the bookmarklet to search in place. Fallback: GitHub wiki search.
Installing
- Precompiled versions — how the prebuilt binary is downloaded at install time, and the source-build fallback.
- Using with pnpm — install notes specific to pnpm.
- Using with yarn — install notes specific to Yarn.
Troubleshooting
- Problem: ABI mismatch in Electron — rebuilding the addon against Electron's bundled Node ABI.
- Problem: different build and prod environments — when the machine that builds is not the machine that runs.
- Problem: installing in a non-ASCII directory — path-encoding pitfalls during the native build.
Developers
- Working on this project — clone with submodules, build, and run the test suite.
Research and notes
- Notes on building alternatives — why WASM and other build approaches were tried and parked.
- Related projects — the wider RE2 / regex-engine landscape.
- FilteredRE2 evaluation — assessment of the prefilter-based multi-pattern API.
- RE2 lookbehinds fork assessment — the EPFL non-backtracking-lookbehind fork, and why it is not vendored.
- V8 Fast API assessment — why V8's Fast API does not fit (and stays closed under N-API).
- V8 non-backtracking RegExp engine — V8's experimental linear engine versus RE2.
Project
- Release history — the full release history with dates.
This project provides Node.js bindings for RE2: a fast, safe alternative to backtracking regular expression engines written by Russ Cox. To learn more about RE2, start with Regular Expression Matching in the Wild. More resources are on his Implementing Regular Expressions page.
RE2's regular expression language is almost a superset of what RegExp provides
(see Syntax), but it lacks backreferences and lookahead assertions. See the README for details.
RE2 emulates standard RegExp, making it a practical drop-in replacement in most cases.
The constructor accepts RegExp directly, honoring all properties.
It works with Node.js Buffers directly, reducing overhead and making processing of long files fast.
Installing
Troubleshooting
- Problem: ABI mismatch in Electron
- Problem: build vs prod environments
- Problem: non-ASCII install path
Developers
Research and notes
- Notes on building alternatives
- Related projects
- FilteredRE2 evaluation
- RE2 lookbehinds fork assessment
- V8 Fast API assessment
- V8 non-backtracking RegExp engine
Project
Repository · README · prebuilds via install-artifact-from-github