Hi,

On Thu, 6 Jun 2002, Hans Hagen wrote:
> > > or even
> > >     $pm_path =~ s/texutil.*?$//i ;
> >Then better
> >       $pm_path =~ s/texutil[^/]*$//i;
> are you sure about that? what excatly does this ^/ stand for ?
I ment [^\/] of cause.
[a] matches only "a" and [^a] matches all characters except "a".
Thus [^\/] should match all letters which are not "/" preventing problems
with paths which contain 'texutil:

~> 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

Reply via email to