From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/8165 Path: main.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: newbi: config Date: Thu, 6 Jun 2002 13:40:34 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <20020606134034.12feaf26.taco@elvenkind.com> 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 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035398592 25246 80.91.224.250 (23 Oct 2002 18:43:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:43:12 +0000 (UTC) Cc: pragma@wxs.nl, ntg-context@ntg.nl Original-To: "Tobias Burnus" In-Reply-To: Xref: main.gmane.org gmane.comp.tex.context:8165 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:8165 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" 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