From: "David A. Black" Date: 2009-07-22T19:49:47+09:00 Subject: Re: String spliting and inclusion Hi -- On Wed, 22 Jul 2009, 7stud -- wrote: > David A. Black wrote: >> Try this. I don't guarantee robustness. >> >> str.scan(/\b.{0,50}(?:$|\b)/m) >> > > Oh my. It's got some problems; see the message I just posted about word length. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Now available: The Well-Grounded Rubyist (http://manning.com/black2) Training! Intro to Ruby, with Black & Kastner, September 14-17 (More info: http://rubyurl.com/vmzN)