From: Todd Benson Date: 2008-03-17T07:40:18+09:00 Subject: Re: returning text between two markers without markers inclu On Sun, Mar 16, 2008 at 4:59 PM, Adam Akhtar 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