regex::Any holds regexes compiled to different enginesOpen and answer this issue on GitHub.
ready · opened 2026-11-21 · updated 2026-11-21 · 0 comments
Part of #673 After #2536
regex::Any: one type for a mix of regexes on different engines, so a list or a struct field can hold patterns compiled to different engines (ADR-regex-1 D3). This is step 6 of #673; it is wanted once there is a second engine (regex::Dfa, step 4, #2536).
regex::Any, holding a Regex[E] of any engine, with the same calls (is_match, find, find_all, captures, replace_all, split). Test: a Vec[regex::Any] holding a regex::Dfa and a regex::Dynamic regex, each searched, its .stdout showing both matches.A regex::Any holds regexes of two engines and each answers the calls as its own engine would, shown by the test above; that commit says Fixes #N.
Split from #673 by Claude Code