http://qs1969.pair.com?node_id=11148267


in reply to Re: Global match and capture group in look-ahead == under-populated "@-"?
in thread Global match and capture group in look-ahead == under-populated "@-"?

It was golfing exercise, where I tried everything possible presumably correct from language spec POV as I see it, be it sketchy or not. In the end I didn't need @-, so no problem at all, thank you, just curiosity. Perhaps I know less about regular expressions than I thought.

Consistent behaviour would be $#- and $#+ both the same and either 0 or 2 here. And all three $1, $+, $^N ending up the same here, also. It's not what I observe.

Can you explain debug output, why the

Matching REx "(?=(a))" against "a"

and then

SUCCEED: subpattern success...

are mentioned twice?

Same with perl -MRegexp::Debugger -e '$_="a";s/(?=(a))/b/g', I hit Enter too many times, why are steps 0..7 repeated twice?