From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28652 invoked from network); 4 Jan 2008 15:47:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Jan 2008 15:47:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 72021 invoked from network); 4 Jan 2008 15:47:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Jan 2008 15:47:44 -0000 Received: (qmail 19031 invoked by alias); 4 Jan 2008 15:47:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24358 Received: (qmail 19016 invoked from network); 4 Jan 2008 15:47:39 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 4 Jan 2008 15:47:39 -0000 Received: from virusfilter.dotsrc.org (bifrost [127.0.0.1]) by spamfilter.dotsrc.org (Postfix) with ESMTP id 6145F8058FF2 for ; Fri, 4 Jan 2008 16:47:37 +0100 (CET) Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [85.115.41.190]) by bifrost.dotsrc.org (Postfix) with ESMTP for ; Fri, 4 Jan 2008 16:47:36 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly07g.srv.mailcontrol.com (MailControl) with ESMTP id m04Fl8FQ030716 for ; Fri, 4 Jan 2008 15:47:30 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 4 Jan 2008 15:47:24 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.1/8.13.4) with ESMTP id m04FlNVt014003 for ; Fri, 4 Jan 2008 15:47:24 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.14.1/8.14.1/Submit) with ESMTP id m04FlNii013999 for ; Fri, 4 Jan 2008 15:47:23 GMT Message-Id: <200801041547.m04FlNii013999@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers Subject: Re: Crash with =~ in script, but not interactively In-reply-to: <237967ef0801040738q3a3287ffy1994fe4b0d6155e4@mail.gmail.com> References: <237967ef0801040127k49e92485rf09ce72c47d076c5@mail.gmail.com> <20080104144237.0eac6c2b@news01> <237967ef0801040738q3a3287ffy1994fe4b0d6155e4@mail.gmail.com> Comments: In-reply-to "Mikael Magnusson" message dated "Fri, 04 Jan 2008 16:38:35 +0100." Date: Fri, 04 Jan 2008 15:47:22 +0000 From: Peter Stephenson X-OriginalArrivalTime: 04 Jan 2008 15:47:24.0526 (UTC) FILETIME=[19AE50E0:01C84EE9] X-Scanned-By: MailControl A-06-00-00 (www.mailcontrol.com) on 10.71.0.117 X-Virus-Scanned: ClamAV using ClamSMTP "Mikael Magnusson" wrote: > Yep that worked. Does the =~ operator support backreferences? I didn't > find anything searching through the manual for the word. This is what > I ended up with instead which works too: It uses $MATCH and $match in the same way (no flags required), unless the option BASH_REMATCH is set in which case it uses the array $BASH_REMATCH. See the description of =~ in zshmisc. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070