From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23202 invoked from network); 8 Jul 2005 07:37:13 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Jul 2005 07:37:13 -0000 Received: (qmail 6481 invoked from network); 8 Jul 2005 07:37:06 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Jul 2005 07:37:06 -0000 Received: (qmail 25679 invoked by alias); 8 Jul 2005 07:36:58 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9058 Received: (qmail 25668 invoked from network); 8 Jul 2005 07:36:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Jul 2005 07:36:56 -0000 Received: (qmail 5292 invoked from network); 8 Jul 2005 07:36:56 -0000 Received: from mail-ihug.icp-qv1-irony2.iinet.net.au (HELO ihug-mail.icp-qv1-irony2.iinet.net.au) (203.59.1.196) by a.mx.sunsite.dk with SMTP; 8 Jul 2005 07:36:53 -0000 Received: from 203-173-49-110.dyn.iinet.net.au (HELO localhost.localdomain) (203.173.49.110) by ihug-mail.icp-qv1-irony2.iinet.net.au with ESMTP; 08 Jul 2005 15:36:47 +0800 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== X-IronPort-AV: i="3.93,272,1114963200"; d="scan'208"; a="12221394:sNHT14451504" Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id j687Uh8g010467 for ; Fri, 8 Jul 2005 17:30:50 +1000 Received: (from doug@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id j687UbeT010464 for zsh-users@sunsite.dk; Fri, 8 Jul 2005 17:30:37 +1000 X-Authentication-Warning: localhost.localdomain: doug set sender to dougkearns@gmail.com using -f Date: Fri, 8 Jul 2005 17:30:37 +1000 From: Doug Kearns To: zsh-users@sunsite.dk Subject: Re: Help parsing a file from one regex to another Message-ID: <20050708073037.GB9744@localhost.localdomain> Mail-Followup-To: zsh-users@sunsite.dk References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Thu, Jul 07, 2005 at 11:36:12PM -0700, Travis Spencer wrote: > Hey, > > I am trying to parse a range of data out of a file from one regular > expression up to another. The input starts with `^@main::FLAGS' and > goes up to the next `)' I am using awk right now, but it is *ugly* > and slow. Does anyone have an suggestions on ways to speed it up and > beautify it? This is pretty raw... flags=( ${=${${${(f)"$(<$tmp_file)"}[(r)@main::FLAGS*,(r)\);]}#*\"}//[^[:upper:][:blank:]]/} ) Regards, Doug