From: Sebastian Hungerecker Date: 2008-01-14T04:45:06+09:00 Subject: Re: regualr expression (need help) Mike McKinney wrote: > should do : > >     ValidDate = File.readlines('someFile.txt').to_s.grep(/Not After/) Yes, and leave out the to_s, too. If you want a string use File.read instead of File.readlines. In this case you can use both, though, since String and Array both have a grep method. But using readlines to get an array and then converting it to string via to_s, doesn't make sense. HTH, Sebastian -- NP: Anathema - Cerulean Twilight Jabber: sepp2k@jabber.org ICQ: 205544826