|We don't bite newbies here... much|
Re^2: Global match and capture group in look-ahead == under-populated "@-"?by Anonymous Monk
|on Nov 20, 2022 at 10:08 UTC ( #11148267=note: print w/replies, xml )||Need Help??|
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 theMatching REx "(?=(a))" against "a"
and thenSUCCEED: 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?
In Section Seekers of Perl Wisdom