From: Craig Demyanovich Date: 2008-10-25T08:12:56+09:00 Subject: Re: help with regular expressions ------=_Part_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 wrote: > You don't need a regular expression for this. To select the lines which > include a slash, you can do > > file = File.new( 'D:/1.txt' ) > slashlines = file.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 ------=_Part_11911_1080565.1224889978689--