From: Tim Hunter Date: 2008-11-29T10:06:14+09:00 Subject: Re: Removing ^M character from text John Victor wrote: > 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 > On Linux, OS X, and other *ix systems, you can use cat -v. In Ruby, String#inspect will show special characters escaped, so you can just use p str to see special characters. A newline shows up as "\n", for example. -- RMagick: http://rmagick.rubyforge.org/