Rename nonbacktracking subexpression to atomic group#16980
Rename nonbacktracking subexpression to atomic group#16980Thraka merged 4 commits intodotnet:masterfrom
Conversation
|
PHP - once only subpattern: https://www.php.net/manual/en/regexp.reference.onlyonce.php |
|
cc: @CyrusNajmabadi |
|
thnks! i can make the roslyn change when this goes in. |
docs/standard/base-types/backtracking-in-regular-expressions.md
Outdated
Show resolved
Hide resolved
docs/standard/base-types/details-of-regular-expression-behavior.md
Outdated
Show resolved
Hide resolved
|
Thanks for updating this, @danmosemsft. |
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
|
Feedback addressed |
|
@Thraka does this look good to merge? |
We currently call the
(?>...)construction a "Nonbacktracking (or "greedy") subexpression."As pointed out by @stephentoub , it is a use of greedy that is not standard. The standard term seems to be atomic group, with some variation eg atomic subexpression, once-only subpattern (PHP) etc.
Changed to atomic group throughout with acknowledgement in one location of the alternative terms.
BTW it feels like subexpression and nonbacktracking ought to have hyphens, but I'm not changing that here.
@stephentoub