develooper Front page | perl.beginners | Postings from March 2002

re:Regexp needed

Thread Previous
Jorge Goncalvez
March 5, 2002 02:04
re:Regexp needed
Message ID:
hi, i have this:
my ($Path) = $MountsPath =~ /(.+?)cygwin/;
but I wanted to get rid of the "/".
because $MountsPath could be c:/cygwin or c:/xyz/cygwin or c:/xyz/zyx/cygwin and 
i wanted $Path = c: or c:/xyz or c:/xyz/zyx .
And now $Path= c:/ or c:/xyz or c:/xyz/zyx.
How can I do ?

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About