Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 browsing the Monastery: (10)
As of 2014-07-29 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls