From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29786 invoked from network); 7 Aug 1999 09:03:55 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Aug 1999 09:03:55 -0000 Received: (qmail 3737 invoked by alias); 7 Aug 1999 09:03:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7394 Received: (qmail 3730 invoked from network); 7 Aug 1999 09:03:39 -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: Un-patch: new pattern matching code Date: Sat, 7 Aug 1999 13:02:16 +0400 Message-ID: <000001bee0b3$8c181970$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.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 In-Reply-To: <9908061547.AA37737@ibmth.df.unipi.it> > > The other cpp definition is BACKREFERENCES, which enables backreferencing > of parentheses in patterns like sed and perl do. I haven't enabled it > because I don't know what, if anything, I'm going to do with it. This may prove useful for ${.../...} case at least. More general use depends on scope of these references. If e.g. the result of last pattern mathing is available (much like in Perl) as, say, ``pattern'' array, than it may be even more useful in case like if [[ ... == ... ]] foo="$pattern[1]-$pattern[3]" that would completely eliminate need of expr. (I am not sure, that there is easy way in Zsh to extract matched subpattern currently) /andrej