Thanks alot everyone...I got it working. I never realized how badly ^M was screwing me up all these years when trying to match with regular expressions. I wish there was a way to see all the end of the line characters, carriage returns and new line without having to guess if they exist and using trial and error for hours when doing regexp matches. vic -- Posted via http://www.ruby-forum.com/.