✳flâneur — a map of the web's best reading
An additional non-backtracking RegExp engine · V8
v8.dev · 1,802 words · saved by 1 readers
V8 now has an additional RegExp engine that serves as a fallback and prevents many instances of catastrophic backtracking.
Starting with v8.8, V8 ships with a new experimental non-backtracking RegExp engine (in addition to the existing Irregexp engine ) which guarantees execution in linear time with respect to the size of the subject string. The experimental engine is available behind the feature flags mentioned below. Runtime of /(a*)*b/.exec('a'.repeat(n)) for n ≤ 100 Here’s how you can configure the new RegExp engine: --enable-experimental-regexp_engine-on-excessive-backtracks enables the fallback to the non-backtracking engine on excessive backtracks. --regexp-backtracks-before-fallback N (default N = 50,000)
Explore this link on the map →saved by
related reading
- Implementing Regular Expressionsswtch.com
- The Regular Expression Denial of Service (ReDoS) cheat-sheet | by James Davis | Level Up Codinglevelup.gitconnected.com
- GitHub - google/re2: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. · GitHubgithub.com
- Regular expression - Wikipediaen.wikipedia.org
- Yes you should understand backprop | by Andrej Karpathy | Mediumkarpathy.medium.com
- Thompson's construction - Wikipediaen.wikipedia.org
- NYSRGnotes.ekzhang.com
- Reading 12: Regular Expressions & Grammarsweb.mit.edu
- Tristan's Site - Tristan Humethume.ca
- Rewriting Bun in Rust | Bun Blogbun.com
- Fast regex search: indexing text for agent tools · Cursorcursor.com
- Regular expression HOWTO — Python 3.14.6 documentationdocs.python.org