On Sun, Mar 16, 2008 at 4:59 PM, Adam Akhtar <adamtemporary / gmail.com> wrote:
> I just wondered, if I had multiple marked sections in a string how would
>  i capture all of them?
>
>  So if my sentance was
>
>  "a bannana is a type of ((fruit)) and a dog is a type of ((animal))" how
>  could I store fruit and animal for later use via regex?

There's #scan...

(str.scan /\({2} (.*?) \){2}/x).flatten
=> ["fruit", "animal"]

Todd