From: Nobuyoshi Nakada Date: 2007-06-05T20:01:39+09:00 Subject: Re: How add "Not-match" logic into Enumerable.grep? Hi, At Tue, 5 Jun 2007 18:55:02 +0900, Morgan Cheng wrote in [ruby-talk:254395]: > Say, I want to get all files in one folder. Since Dir.entries will > have "." and ".." included. I want to strip them out with "grep". I > tried to write in such a way as I can did similarly in Perl: > log_files = Dir.entries(log_dir).grep(!/^\.\.?/) grep(/\A(?!\.\.?\z)/) -- Nobu Nakada