Add a from-scratch regex engine and wire it into the JS runtime:
- regex.rs: Pattern parser (character classes, quantifiers, anchors,
groups, alternation, backreferences, lookahead, escape sequences)
and backtracking matcher with proper continuation-based sequence
matching for greedy/lazy quantifiers.
- RegExp constructor and prototype methods (test, exec, toString)
with support for g/i/m/s/u/y flags, lastIndex tracking, and
named capture groups.
- Compiler emits RegExp(pattern, flags) calls for regex literals.
- String.prototype gains match, matchAll, search methods; replace,
replaceAll, split updated to handle RegExp arguments with capture
group substitution ($1, $&, etc.).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>