Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: One regex construct to handle multiple string types

by Krambambuli (Deacon)
on Nov 29, 2008 at 10:41 UTC ( #726763=note: print w/ replies, xml ) Need Help??


in reply to Re^2: One regex construct to handle multiple string types
in thread One regex construct to handle multiple string types

It's not about \w, but about backtracking.

\w* initially 'eats' 2L, but then is forced to ... well... put the 'L' back on the table to let \S have it.

Hmm... maybe 'eating' is not the best image for what's going on with backtracking regexps...?

:)


Krambambuli
---


Comment on Re^3: One regex construct to handle multiple string types
Re^4: One regex construct to handle multiple string types
by pobocks (Chaplain) on Nov 29, 2008 at 10:46 UTC

    AHHH! Thank you. Enlightenment is mine.

    "Must-match" versus "may-match" - separating the men from the boys of regex tug-o-war.

    for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2015-07-07 07:17 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 (87 votes), past polls