perlretutmy $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;
In reply to Re: extract file name from path
by keszler
in thread extract file name from path
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |