From: Jim Freeze Date: 2003-01-31T06:49:15+09:00 Subject: Re: How to do grep -v? On Friday, 31 January 2003 at 5:29:27 +0900, Ian Macdonald wrote: > 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]/) Doesn't work for 'a' being more than one character. How does one do a negative regex match? Jim -- Jim Freeze ---------- Paranoids are people, too; they have their own problems. It's easy to criticize, but if everybody hated you, you'd be paranoid too. -- D. J. Hicks