On Sat, Oct 2, 2010 at 9:25 AM, timr <timrandg / gmail.com> wrote:
> I'd go with regex, but we need more cases with expected results to
> figure out which regex would work for you.
> How about this?
>
>>> "no match outside (inside all (gets) collected)".match(/\((.*)\)/)[1]
> => "inside all (gets) collected"

This could match more than expected:

irb(main):001:0> "something (this should be stripped), but not this,
(and this too), and again not this".match(/\((.*)\)/)[1]
=> "this should be stripped), but not this, (and this too"

Jesus.