Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Interesting behavior of regular expression engine (last not matched first)

by tye (Cardinal)
on Mar 13, 2013 at 05:52 UTC ( #1023111=note: print w/ replies, xml ) Need Help??


in reply to Re: Interesting behavior of regular expression engine
in thread Interesting behavior of regular expression engine

In both cases the last part of the regexp is the longest floating string, so is the part that Perl attempts to match first.

I've never seen that be the case and I seriously doubt that it was the case in your test run.

The only thing I've seen the regex engine do with the "longest floating string" is to use only the length it to estimate the offset where it will begin searching for a match (going left-to-right in the string and left-to-right in the regex).

- tye        


Comment on Re^2: Interesting behavior of regular expression engine (last not matched first)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-07-03 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls