Files
regex-tools/docs/FLAVOUR_SUPPORT.md

6.6 KiB

Flavour support

Flavour Syntax Execution Replacement Captures Trace Analysis Generated cases Native offsets
ECMAScript regexpp 4.12.2; explanations partial/feature-matrix tested Current browser RegExp; conformance tested Bounded ECMAScript GetSubstitution Named/numbered; final repeated capture; no history Unavailable Experimental static heuristics + bounded native probes Bounded normalized-AST sampling; actual-engine verified UTF-16
PCRE2 10.47 Application lexical provider partial; compiler authoritative Pinned 8-bit WASM; bounded/killable/conformance tested Native bounded pcre2_substitute() loop Native named/numbered records; no capture history Bounded reported automatic callouts; derived movement labels Unavailable; ECMAScript heuristics are never applied Unavailable; structural syntax provider is partial UTF-8 bytes
PCRE Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable
Python re Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Planned code points
Go regexp Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Planned UTF-8 bytes
Rust regex Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Planned UTF-8 bytes
.NET Unavailable Unavailable Unavailable Planned capture history Unavailable Unavailable Unavailable Planned UTF-16
Java Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Unavailable Planned UTF-16

ECMAScript tests cover its complete exposed flag matrix, internal indices, zero-length iteration, captures, lookbehind, backreferences, Unicode properties and bounded replacement.

PCRE2 tests cover g, i, m, s, x, U, J, mandatory UTF/UCP, branch-reset groups, recursion, \K, duplicate names, native substitution, astral byte/UTF-16 ranges, zero-length iteration, compile errors, match limits and result/output truncation. Trace tests cover reported automatic callouts, bounded mark copying, native stop at the complete-event cap, compile ranges, worker loading and browser rendering.

ECMAScript static findings and generated-input timing observations are advisory. They describe only the selected ECMAScript 2025 pattern, browser runtime and bounded inputs; they are not proofs of safety or general complexity.

ECMAScript generated-case version 1 uses only a complete accepted normalized AST, an explicit deterministic seed and bounded sampling strategies. Every retained positive or negative label is confirmed by the actual selected browser engine. PCRE2 generation is unavailable because its current lexical provider is intentionally partial; ECMAScript behavior is never relabelled as PCRE2.

The PCRE2 explanation provider deliberately does not invent full structural coverage. In particular, branch-reset numbering is omitted from the syntax tree while actual capture numbers and names still come from PCRE2 results.

ECMAScript and PCRE2 support exact-request comparison for syntax acceptance, engine compilation, matches, captures and engine-native replacement. Results align by normalized UTF-16 ranges while retaining each native offset model. Timeout, cancellation, rejection and truncation are never presented as equivalent results.

Pattern formatting is available only for an exact accepted ECMAScript regexpp snapshot. It canonicalizes literal slashes and raw control/line-separator representations, then requires paired actual-engine and applicable exact-test validation before apply. PCRE2 formatting is unavailable because the current provider is deliberately partial; its syntax is never treated as ECMAScript.

PCRE2 is the only current code-generation target. The reviewed C17 generator is pinned to the PCRE2 10.47 8-bit API; other language generators remain unavailable until they pass equivalent escaping and named-toolchain gates.