From: Bill Kelly Date: 2003-01-31T06:58:39+09:00 Subject: Re: How to do grep -v? From: "Jim Freeze" > > > > Is there a more direct way than this to get 'grep -v'? > > > > > > > > c=%w{a b c} #=> ["a", "b", "c"] > > > > c -= c.grep(/a/) #=> ["b", "c"] > > > How about c.reject {|e| e =~ /a/} ? (or c.delete_if if you want to modify c) HTH, Bill