On Feb 28, 2006, at 7:59 PM, Daniel Nugent wrote: > Give out your favorite one liner, what it does, and when you use it. This was originally posted by Erik Terpstra, with some editing from others to improve it: >> str = 'This is a test of the emergency broadcasting services' => "This is a test of the emergency broadcasting services" >> str.scan(/(.{1,10}|\S{11,})(?:\s+|$)/) # poor man's word wrap => [["This is a"], ["test of"], ["the"], ["emergency"], ["broadcasting"], ["services"]] Isn't that cool? ;) James Edward Gray II