From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/8163 Path: main.gmane.org!not-for-mail From: Tobias Burnus Newsgroups: gmane.comp.tex.context Subject: Re: newbi: config Date: Thu, 6 Jun 2002 12:06:31 +0200 (CEST) Sender: owner-ntg-context@let.uu.nl Message-ID: References: <5.1.0.14.1.20020606111535.0346cd20@server-1> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1035398590 25233 80.91.224.250 (23 Oct 2002 18:43:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:43:10 +0000 (UTC) Cc: NTG-ConTeXt Original-To: Hans Hagen In-Reply-To: <5.1.0.14.1.20020606111535.0346cd20@server-1> Xref: main.gmane.org gmane.comp.tex.context:8163 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:8163 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