G
George
Hi
I am trying to get directory name from say a path
c:/app/organizer
what I want to get is organizer , so basically if I search from end
of string and then lookbehind
($name)=($path=~(/(?<=\/)(.*?)(.*?)\z/));
but it does not result in getting to oraginzer , it fetches app/
organizer , kind of greedy
I know I can do it using FILE::BASENAME , but want to understand how
to do it using regexp and look back
thaks
/g
I am trying to get directory name from say a path
c:/app/organizer
what I want to get is organizer , so basically if I search from end
of string and then lookbehind
($name)=($path=~(/(?<=\/)(.*?)(.*?)\z/));
but it does not result in getting to oraginzer , it fetches app/
organizer , kind of greedy
I know I can do it using FILE::BASENAME , but want to understand how
to do it using regexp and look back
thaks
/g