Drop-in#
real::regex replaces the regex engine you already use — same API, a linear-time, ReDoS-safe engine underneath.
C++ engine replacements
std::regex — the
<regex>surface with per-pattern fallback; the compatibility reference holds the exhaustive contract.RE2 —
real::compat::re2, the RE2-shaped surface on the same linear engine, header-only and zero-dep.
Language bindings — each a drop-in for its host’s regex API:
Python re —
import real as re, strict by default.Rust regex crate —
use real_regex::Regex, same surface.Go regexp —
real.MustCompile, v0.1 subset.