Jesús Gabriel y Galán wrote:
> On 10/8/07, Max Williams <toastkid.williams / gmail.com> wrote:
>> This gives me eg
>> i want to keep them, eg
>>
>> "3 * (1 + (4 / 2))" => ["1 + (4 / 2)"]
>>
>> can anyone show me how to do this?
> 
> x = "3 * (1 + 2)".match(/\((.*)\)/)
> x.captures
> => ["1 + 2"]
> x = "3 * (2 + (1 + 3))".match(/\((.*)\)/)
> x.captures
> => ["2 + (1 + 3)"]
> 
> Hope this helps,
> 
> Jesus.

ah, "captures" - that's the same as MatchData#to_a, right?  Perfect, 
thanks!
-- 
Posted via http://www.ruby-forum.com/.