Perl: the Markov chain saw | |
PerlMonks |
Re^3: perl indication of end of string already matchedby rsFalse (Chaplain) |
on Jun 16, 2020 at 11:31 UTC ( [id://11118130]=note: print w/replies, xml ) | Need Help?? |
>>How does the regex engine know that it matched $? Hi. I think engine doesn't know. It knows e.g. that it matched a zero-length branch once. And it cancels to match second time the same place in order to avoid eternal matching. I believe you can get similar results with regexes like these: m/.|(?:)/gc, m/.|(?=)|(?:)/gc...
In Section
Seekers of Perl Wisdom
|
|