From: Peter Bailey Date: 2008-01-04T04:54:38+09:00 Subject: Re: Why doesn't this file read work for me? > String#scan returns an array. So you can check the size. > > if stuff.to_s.scan(/^\%\%Creator: MathType/).size == 0 > > Or you can simple use String#match instead which is the behavior you are > looking for. > > if stuff.to_s.match(/^\%\%Creator: MathType/) > >> >> > HTH, > Michael Guterl Thank you very much, Michael. I used .match and it works fine now. -- Posted via http://www.ruby-forum.com/.