------ art_11911_1080565.1224889978689 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Fri, Oct 24, 2008 at 6:05 PM, Siep Korteling <s.korteling / gmail.com>wrote: > You don't need a regular expression for this. To select the lines which > include a slash, you can do > > file ile.new( 'D:/1.txt' ) > slashlines ile.select {|line| line.include?( '/' )} > file.close > puts slashlines > > > The select method will read each line and put each line for which the > block is true in an array. Siep, I can't find any documentation on File#select, and IO#select is not documented as doing what you show. Could you provide more info about it? Thanks, Craig ------ art_11911_1080565.1224889978689--