From: Ian Macdonald Date: 2003-01-31T05:29:27+09:00 Subject: Re: How to do grep -v? On Fri 31 Jan 2003 at 05:22:16 +0900, Berger, Daniel wrote: > > -----Original Message----- > > From: Jim Freeze [mailto:jim@freeze.org] > > Hi > > > > 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"] > > c.grep(/[^a]/) Or even: c.delete('a') Ian -- Ian Macdonald | Hear about... the cross-eyed shoe ian@caliban.org | fetishist who was always getting off on the | wrong foot? | |