From: Michael Monaghan Date: 2008-11-29T05:07:03+09:00 Subject: Re: Removing ^M character from text ------=_Part_52216_17776136.1227903120748 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi John, str = "123^M56" newstr = str.sub(/^M/, '') Note - for the substitution, you enter the '^M' character using Ctrl+v+m (- or at least I do on Solaris.) ~mm On Fri, Nov 28, 2008 at 2:57 PM, John Victor wrote: > I have some text that I just realized is screwing everything up because > it contains the ^M character (control-M). I have tried using all kinds > of regexp expressions to find and remove it but it is evasive :-) > > What is the best way to find and remove the pesky ^M character from > text? > > vic > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_52216_17776136.1227903120748--