zsh-users
 help / color / mirror / code / Atom feed
From: Doug Kearns <dougkearns@gmail.com>
To: zsh-users@sunsite.dk
Subject: Re: Help parsing a file from one regex to another
Date: Sat, 9 Jul 2005 16:41:03 +1000	[thread overview]
Message-ID: <20050709064103.GC3825@localhost.localdomain> (raw)
In-Reply-To: <1050708171627.ZM16747@candle.brasslantern.com>

On Fri, Jul 08, 2005 at 05:16:27PM +0000, Bart Schaefer wrote:
> On Jul 8,  5:30pm, Doug Kearns wrote:
> } Subject: Re: Help parsing a file from one regex to another
> }
> } > 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*
> } 
> } flags=( ${=${${${(f)"$(<$tmp_file)"}[(r)@main::FLAGS*,(r)\);]}#*\"}//[^[:upper:][:blank:]]/} )
> 
> That only works if the closing paren is on a line by itself, I think.
> You need (r)*\); in the subscript expression, maybe even (r)*\);* if there
> may be other stuff following the close-paren.

Thanks for catching that. It 'worked' by accident and I didn't notice
that the PRIORITIES had been pulled in too...

I always forget that a non-matching pattern in the second expression
causes the rest of the array to be selected. Is this documented
somewhere that I'm missing?

<snip>

Regards,
Doug


  parent reply	other threads:[~2005-07-09  6:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-08  6:36 Travis Spencer
2005-07-08  7:30 ` Doug Kearns
2005-07-08 17:16   ` Bart Schaefer
2005-07-08 19:24     ` Travis Spencer
2005-07-09  6:41     ` Doug Kearns [this message]
2005-07-09 17:16       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050709064103.GC3825@localhost.localdomain \
    --to=dougkearns@gmail.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).