From: Ryan Davis Date: 2008-03-26T02:50:25+09:00 Subject: Re: remove regex matched line question You're not rejecting anything complicated, so it is just as easy to select what you want instead of rejecting what you don't want: puts File.read("./src.txt").grep(/^[^#]/).join("\n")