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?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Global match and capture group in look-ahead == under-populated "@-"?
by Anonymous Monk on Nov 20, 2022 at 10:19 UTC |