随便 google 的
This is where Dir.glob and its cousins come in. By "globbing" a number of files, you can use regular expression-like pattern matching to select just the files you want. Note that though these are like regular expressions, they are not. They're very limited compared to Ruby's regular expressions and are more closely related to shell expansion wildcards than regular expressions.