AntiPattern

Regex Quantifier Capture Staleness

regex-quantifier-stale-capture

Regex groups can retain their last successful capture when a quantified group is evaluated again and later fails, producing stale matched substrings and misleading downstream logic (e.g., filters, group assertions, or lookaround splits).