Oops, my mistake. But even better is:

s/(.*)texutil.*?$/$1/i

(which is what I *meant* all along :-))

The advantage is that this doesnt depend on the path separator.

On Thu, 6 Jun 2002 12:06:31 +0200 (CEST)
"Tobias Burnus" <[EMAIL PROTECTED]> wrote:
> ~> perl -e 'my $foo = "/foo/texutil/bar/texutil.pl"; $foo =~ s/texutil.*?$//i; print 
>"$foo\n";'
> /foo/
> ~> perl -e 'my $foo = "/foo/texutil/bar/texutil.pl"; $foo =~ s/texutil[^\/]*$//i; 
>print "$foo\n";'
> /foo/texutil/bar/
> 
> 
> Tobias


-- 
groeten,

Taco

Reply via email to