From: Nikodemus Siivola Date: 2002-09-24T23:32:13+09:00 Subject: Re: select and select On Tue, 24 Sep 2002, Gavin Sinclair wrote: > I like 'grab', but I doubt others Hmm. grab makes me think: why not extend the semantics of grep? a = ["foo", "bar", "foobar", "barfoo"] a.grep(1,3) # => ["bar", "barfoo"] a.grep(/foo/) # => ["foo", "foobar", "barfoo"] h = { :a => "foo", :b => "bar", :c => "foobar", :d => "barfoo" } h.grep(:a,:c) # => ["foo", "foobar"] h.grep(/bar/) # => ["bar", "foobar", "barfoo"] -- Nikodemus