From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22582 invoked from network); 5 Apr 2001 18:10:15 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Apr 2001 18:10:15 -0000 Received: (qmail 14498 invoked by alias); 5 Apr 2001 18:10:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13913 Received: (qmail 14485 invoked from network); 5 Apr 2001 18:10:09 -0000 From: "Bart Schaefer" Message-Id: <1010405180950.ZM9683@candle.brasslantern.com> Date: Thu, 5 Apr 2001 18:09:50 +0000 In-Reply-To: <200104051122.NAA06140@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "PATCH: reverse string subscripting" (Apr 5, 1:22pm) References: <200104051122.NAA06140@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: PATCH: reverse string subscripting MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 5, 1:22pm, Sven Wischnowsky wrote: } Subject: PATCH: reverse string subscripting } } This is from the debian bug list: } } % a=abcd } % echo $a[1,(r)d] } } didn't work, because it stopped one character too early trying to find } the matching substring for `d'. Note the (r) is forward pattern matching, not reverse; (R) is reverse. Your patch appears to have fixed the bug only for the forward direction: zagzig% x=abcd zagzig% echo $x[(r)d] d zagzig% echo $x[1,(r)d] abcd zagzig% echo $x[(R)d] d zagzig% echo $x[1,(R)d] zagzig% echo $x[1,(R)c] abc zagzig% -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net