From: Glenn Jackman Date: 2009-07-18T00:50:05+09:00 Subject: Re: replacing verticle white spaces? At 2009-07-17 08:11AM, "Mirko Viviani" wrote: > 2009/7/17 George George > > Any ideas on how to replace a verticle white space? [...] > puts s.gsub(/\r\n(\r\n)+/,"\r\n\r\n") I would write: s.gsub(/((?:\r?\n){2})(?:\r?\n)*/, '\1') In Ruby, are newlines represented just as "\n" regardless of your platform? -- Glenn Jackman Write a wise saying and your name will live forever. -- Anonymous