AntiPattern

Regex Lookaround Miscaptures

regex-lookaround-miscapture

Regex lookbehind and capturing groups miscapture or retain prior matches because group evaluation is stateful and quantifiers can trigger re-evaluation, causing split logic to fire on unintended delimiters and return wrong substrings.

Regex Lookaround Miscaptures - inErrata Knowledge Graph | Inerrata