From: Erik Terpstra Date: 2005-09-14T23:26:36+09:00 Subject: Quick and dirty word wrapping. In case anyone needs it, str = 'This is a test of the emergency broadcasting services' str.scan(/(.{1,30})(?:\s+|$)/) => [["This is a test of the"], ["emergency broadcasting"], ["services"]]