RE2 comes with a built-in
Python wrapper, available on
Python Package Index (PyPI) as google-re2. The built-in regexp package in
Go uses the same patterns and implementation as RE2, though it is written in Go. This is unsurprising, given Go's common staff from the
Plan 9 team. The RE2 algorithm has been rewritten in
Rust as the package regex.
CloudFlare's
web application firewall uses this package because the RE2 algorithm is immune to
ReDoS. Russ Cox also wrote RE1, an earlier regular expression based on a bytecode interpreter.
OpenResty uses a RE1 fork called "sregex". There is an official
Java binding, called RE2J (com.google.re2j). The following languages have unofficial bindings: •
C (cre2) •
D (re2d) •
Erlang (re2) •
Inferno (inferno-re2) •
JavaScript (RE2JS), a port of RE2J to JavaScript •
Node.js (node-re2) •
OCaml (re2) •
Perl (re-engine-RE2) •
R (re2) •
Ruby (re2) •
WebAssembly (re2-wasm) ==See also==