Well, there’s Enumerable#reject – but it takes a
block. Might be nice if there were a regex version
also. But that opens the proverbial can of worms.
Hal
···
----- Original Message -----
From: “Jim Freeze” jim@freeze.org
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Thursday, January 30, 2003 3:49 PM
Subject: Re: How to do grep -v?
c.grep(/[^a]/)
Doesn’t work for ‘a’ being more than one character.
How does one do a negative regex match?