Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: On zero-width negative lookahead assertions

by Roy Johnson (Monsignor)
on Sep 10, 2004 at 15:51 UTC ( [id://390123]=note: print w/replies, xml ) Need Help??


in reply to Re^4: On zero-width negative lookahead assertions
in thread On zero-width negative lookahead assertions

so the old adagio that "* is greedy" has an exception
No, it is always greedy, but its greed is not absolute. It will eat as much as it can, but if that results in failure to match, then it will relinquish some of what it ate (try not to picture that) to allow the whole expression to match. Greed (and the anti-greed of minimal-matching) is tempered by persistence in regexen.

Recently, hv wrote a tutorial explaining the rules the regex engine uses in trying to find a match.


Caution: Contents may have been coded under pressure.
  • Comment on Re^5: On zero-width negative lookahead assertions

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found