From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22533 invoked from network); 13 Apr 2000 06:00:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Apr 2000 06:00:19 -0000 Received: (qmail 2082 invoked by alias); 13 Apr 2000 06:00:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10719 Received: (qmail 2074 invoked from network); 13 Apr 2000 06:00:07 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Peter Stephenson" , "Zsh hackers list" Subject: RE: Should we backup this change? RE: Modifier substitutions. Date: Thu, 13 Apr 2000 10:00:05 +0400 Message-ID: <000001bfa50d$83d622b0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal In-reply-to: > > > ${foo/$bar/...} into ${foo/\\$bar/...} > > > > The problem is (as I discovered later) it is not complete. > There is no > > way to anchor pattern to match full string. > > You should now be able to do ${foo/(#s)$bar(#e)/...}. In this particular case I was about to simply use ${...:/...} (untested). And this is the form I was referred to - you cannot put this anchor in pattern. I also believe, that it should be possible to simulate left/right anchoring by using ${...:/...} and (pat)* or *(pat). May be, it could match too much, dunno. BTW where are these (#s) and (#e) useful? The patterns in parameter expansions are anchored by definition; the patterns in conditional expressions/case statements are anchored to full word as well. Could you provide example where you cannot do without (#s)/(#b)? In any case, this is additional argument in favour of backing out this change (assuming, that these (#s)/(#b) really work). -andrej