You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... causes the end of successful matching at the point at which the (*ACCEPT) pattern was encountered, regardless of whether there is actually more to match in the string.
... is not clear when it should be encountered: 1) on backtracking (like (*SKIP)), or 2) on forward-tracking like (*FAIL) aka (?!).
Steps to Reproduce
In simplest case a verb is encountered on forward-tracking (b haven't match):
In this example it could be either forward-tracking behavior (look-ahead isn't even reached), or backtracking (third match with b survives because of acception):
...it looks like on the third match attempt (*ACCEPT) was not encountered at forward-tracking (otherwise it would succeed), and after a failure on look-ahead, it couldn't finish matching attempt because an atomic group haven't let to backtrack into itself and encounter a verb.
...same output as with possessive {1}+, except perl-5.20.1 where it was a bug.
Same as in non-atomic example, but with quantifier {1} added. Should be the same. Differences are in older versions:
...in the latest versions a verb seems to be encountered on forward-tracking. Otherwise it should have matched [0:bbb] IMO, which is somehow similar to the outputs of earlier versions.
Expected behavior
Not clearly defined when a verb should be encountered.
The text was updated successfully, but these errors were encountered:
https://perldoc.perl.org/perlre#(*ACCEPT)-(*ACCEPT:arg)
Description
From documentation:
... is not clear when it should be encountered: 1) on backtracking (like
(*SKIP)
), or 2) on forward-tracking like(*FAIL)
aka(?!)
.Steps to Reproduce
In simplest case a verb is encountered on forward-tracking (
b
haven't match):In this example it could be either forward-tracking behavior (look-ahead isn't even reached), or backtracking (third match with
b
survives because of acception):Same example but with atomic (
(?>...)
):...it looks like on the third match attempt
(*ACCEPT)
was not encountered at forward-tracking (otherwise it would succeed), and after a failure on look-ahead, it couldn't finish matching attempt because an atomic group haven't let to backtrack into itself and encounter a verb....same output as with possessive
{1}+
, except perl-5.20.1 where it was a bug.Same as in non-atomic example, but with quantifier
{1}
added. Should be the same. Differences are in older versions:Same but with quantifier
+
. Both(?>...)
(not shown) and(?:...)
outputs the same:...in the latest versions a verb seems to be encountered on forward-tracking. Otherwise it should have matched
[0:bbb]
IMO, which is somehow similar to the outputs of earlier versions.Expected behavior
Not clearly defined when a verb should be encountered.
The text was updated successfully, but these errors were encountered: