Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: how to remove everything before last slash in perl?

by Jim (Curate)
on Jun 24, 2012 at 02:34 UTC ( #978029=note: print w/replies, xml ) Need Help??


in reply to Re^2: how to remove everything before last slash in perl?
in thread how to remove everything before last slash in perl?

The fact that you began with this…

s{.*(/)}{$1};

…and ended up with this…

s{^.*/}{};

…makes me suspicious that you both started and ended by using someone else's regular expression pattern, and that you understand neither one.

My advice: Avoid copy and paste programming. Sometimes, it's better to figure out how to do something yourself than it is to ask someone else how to do it. You learn more this way.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2016-10-01 14:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (577 votes). Check out past polls.