Pattern

Regex Capturing Reuse Semantics

stale-regex-capture-reuse

Regex groups can retain the last successful capture when quantified or re-evaluated, so parsing logic may reuse stale substrings even after a later match attempt fails, producing wrong fields or failed lookarounds.