in reply to regular expression for workdir

One way:

$path =~ m|$magic_word/([^/]+/[^/]+)/|; print "$1\n";

Replies are listed 'Best First'.
Re^2: regular expression for workdir
by azaria (Beadle) on Jan 01, 2006 at 17:48 UTC
    Thanks you all, this is exactly what i need !!!!