From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17659 invoked from network); 13 Apr 2004 12:01:15 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Apr 2004 12:01:15 -0000 Received: (qmail 1897 invoked by alias); 13 Apr 2004 12:00:18 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7338 Received: (qmail 1878 invoked from network); 13 Apr 2004 12:00:15 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 13 Apr 2004 12:00:15 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 13 Apr 2004 12:0:15 -0000 Received: (qmail 31999 invoked from network); 13 Apr 2004 12:00:15 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 13 Apr 2004 12:00:14 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i3DC09M27319 for ; Tue, 13 Apr 2004 14:00:11 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1BDMaz-00019N-00>; Tue, 13 Apr 2004 14:00:53 +0200 Date: Tue, 13 Apr 2004 14:00:53 +0200 From: DervishD To: Zsh Users Subject: Subscripting without temporaries Message-ID: <20040413120053.GA4420@DervishD> Mail-Followup-To: Zsh Users Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.1i Organization: Pleyades X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi all :) I have an array containing strings of this type, one per 'slot': "Some text [particular text] Another text" For each line I want to be able to separate the three parts: the 'Some text', the '[Particular text]', and the 'Another text'. I know I can do it using things like print ${array[EXP]/(#b)(*) (\[*\]) (*)/} and I will get the three parts in the $match array, one per slot. I can do this because I know that the brackets can be used as separators (they are never present in the first part nor the last part). The question is that I'm sure that there is another better method for doing the same without using backreferences and parameter replacement. I think that, as we say in spanish, I'm using a cannon to kill flies... Which is the zsh-cool-way of doing the same? Thanks in advance :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/