in reply to Re: help on reg ex
in thread help on reg ex

Your example: would put in $bar everything starting from the first slash. You should instead do:
$a =~ s#(/[^/]*)$##; $bar = $1;

-- zigdon

Replies are listed 'Best First'.
Re: (z) Re^2: help on reg ex
by Improv (Pilgrim) on May 07, 2003 at 17:16 UTC
    Oops, you're right. My bad -- I don't know what I was thinking :) You provide a good example to the user of a case where it's a good idea to use a nonstandard regex delimiter, BTW. Cool.