Hi Experts, Please help me here. I need to take substring (/fold1/fold2/fold3/) out of following one.
$str1="/fold1/fold2/fold3/file.pl" DB<48> p $str1 /fold1/fold2/fold3/file.pl DB<49> if ($str1 =~ m#([^/]+)$#) { print $1;} file.pl <<<< I managed to get my file name but need to get rest of th +e path. DB<50>
I need to print "/fold1/fold2/fold3/" in fact. what regexp will help me here? -Thanks, Vijesh
In reply to regex help by vijesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |