Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: perl indication of end of string already matched

by rsFalse (Chaplain)
on Jun 16, 2020 at 11:31 UTC ( [id://11118130]=note: print w/replies, xml ) Need Help??


in reply to Re^2: perl indication of end of string already matched
in thread perl indication of end of string already matched

>>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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118130]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2024-04-19 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found