From: Gary Wright Date: 2007-09-05T06:29:46+09:00 Subject: Re: Why does File.exists? not support regexp? It would be very handfull? On Sep 4, 2007, at 12:00 PM, kazaam wrote: > On Wed, 5 Sep 2007 00:52:57 +0900 > Daniel Berger wrote: > >> Dir["fglrx*"].each{ |file| File.delete(file) } >> > that's pretty much the same like: system('rm -f fglrx*') but I'm > asking why one doesn't allow regexpr into File.exists? I would guess it is because file name pattern matching is subtly different from string pattern matching. In particular you have the problem of directory hierarchies and how to handle the separator character (typically '/'). The common file pattern syntax is also *not* the same as general regular expressions. Gary Wright