On Fri, 26 Apr 2002, Michael Brailsford wrote:

> >     "{foo} {bar} {something else} {and so on}"
> >
> > And I want to parse it into an array that looks like this:
> >
> >     ["foo", "bar", "something else", "and so on"]
>
> Try String#scan.  It is similar to te g options in sed/vim/perl's s///,
> and the return from String#scan is an Array.

Ah, that's it. So I want

    parsed_defs = defs.scan(/\{([^}]+)} ?/).collect { |m| m[0] }

Thanks!

cjs
-- 
Curt Sampson  <cjs / cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC