A proposal to add atomic groups ((?>…)) and possessive quantifiers (*+, ++, etc.) to ECMAScript regular expressions for backtracking control.
This proposal introduces atomic operators to ECMAScript regular expressions, providing fine-grained control over backtracking behavior. It aims to improve performance and prevent catastrophic backtracking in complex pattern matching scenarios.
(?>…)) — Matches a pattern but discards backtracking information upon success, preventing re-evaluation of alternatives if subsequent parts fail.*+, ++, ?+, {n}+, etc.) — Greedy quantifiers that do not backtrack if the rest of the pattern fails, offering syntactic sugar over atomic groups.u) and non-Unicode modes.The proposal follows ECMAScript's evolution to align with established regex features from other languages, prioritizing performance and developer control without breaking existing behavior.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.