Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 scrutinizing the Monastery: (18)
As of 2014-07-14 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (260 votes), past polls