From: Gavin Sinclair Date: 2003-01-31T19:58:46+09:00 Subject: Re: How to do grep -v? On Friday, January 31, 2003, 9:18:48 AM, nobu wrote: > Hi, > At Fri, 31 Jan 2003 06:49:15 +0900, > Jim Freeze wrote: >> > > > 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? > Try . RAA.search 'reop' # => nil Gavin