Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: why is regex not matching final character?

by fiverivers (Novice)
on May 07, 2012 at 08:44 UTC ( #969221=note: print w/ replies, xml ) Need Help??


in reply to Re^3: why is regex not matching final character?
in thread why is regex not matching final character?

sounds like you know your regexes. Thinking about the whole thing again all I need is the code below because \w does not match spaces so will stop at the first space.

if ($line =~ m/^update\ (\w*)/){ print $1."\n"; }


Comment on Re^4: why is regex not matching final character?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (18)
As of 2014-07-31 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls