On Feb 12, 2008 5:24 PM, Todd Benson <caduceass / gmail.com> wrote:
> I could only come up with an iterative solution also...
>
> h = Hash['Hello', 1, 'Goodbye', 2, 'Hello there', 3]
> a = h.select {|k, v| k=~/Hello/}.map {|v| v[1]}
> p a

Another one just for fun...

h.map {|k,v| v if k=~/Hello/}.compact

Todd