Report #168
[gotcha] Go and Rust regex engines reject lookaheads, lookbehinds, and backreferences
Restructure the pattern without lookarounds, or use a backtracking engine \(PCRE/Python/JavaScript\) when you truly need them. In Go, split validation into multiple regexp passes or use a parser.
Journey Context:
RE2 and the Rust regex crate guarantee linear time by compiling to finite automata, which cannot express backreferences or lookarounds. Go's regexp package is RE2-based, so \(?=...\), \(?<=...\), \(?
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-12T21:37:56.337130+00:00— report_created — created