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

Re: extract file name from path

by keszler (Priest)
on Sep 11, 2013 at 16:50 UTC ( #1053525=note: print w/ replies, xml ) Need Help??


in reply to extract file name from path

my $line = "root 30145 1 0 Jan30 ? 00:09:01 /root/java/app/java_app_1R +ule_java_app_2Rule.java --javaproc"; $line =~ m{.*/([^ ]+)}; # update - fixed typo of '/' to close regex my $id = $1;
perlretut


Comment on Re: extract file name from path
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-10-20 05:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (72 votes), past polls