From: Dan Zwell Date: 2007-04-30T11:57:11+09:00 Subject: Re: problem replacing newlines in regexp Harry wrote: > On 4/30/07, Mike Steiner wrote: >> I'm trying to do a gsub ( "\n" , " " ) but none of the newlines are >> replaced. Is there something special I have to do for newlines? (If it >> makes >> a difference, I'm running under Windows.) >> >> > > Try gsub!( "\n" , " " ) > > Harry > You've probably gotta specify the multiline match option (the /m at the end): line.gsub!(/\n/m, " ") Dan