From: 7stud -- Date: 2009-07-22T19:51:22+09:00 Subject: Re: String spliting and inclusion Robert Dober wrote: > On 7/22/09, David A. Black wrote: >> > strings no longer than 50 characters in length. At present I have the >> > and only 20 characters remain it misses them off the output (it outputs >> > >> >> Try this. I don't guarantee robustness. >> >> str.scan(/\b.{0,50}(?:$|\b)/m) > I fail to see why you put a \b at the beginning David, > would you mind to explain? > Yes. Please explain that. Also please explain why you don't have {1,50}? Or, will you claim the 5th under the robustness disclaimer? -- Posted via http://www.ruby-forum.com/.