From: William James Date: 2006-03-14T00:48:45+09:00 Subject: Re: word_wrap method for String? Lou Vanek wrote: > here's a (partially modded) excerpt from a previous discussion on this topic: > > width = 11 > str = 'This is a test of the emergency broadcasting servicings I asseverate' > p str.scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/) When you modded, you didn't notice that 8 was 2 less than the width. str = 'This is a test of the emergency broadcasting servicings I asseverate' p str.scan(/\S.{0,#{width-2}}\S(?=\s|$)|\S+/)