Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Help parsing a file from one regex to another



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



Messages sorted by: Reverse Date, Date, Thread, Author