From: Rudolf Polzer Date: 2003-08-23T08:59:07+09:00 Subject: Re: Line wrapping Scripsit ille aut illa �Warren Brown� : > def wrap(s) > s.gsub(/(.{1,74})(\s+|\Z)/,"\\1\n") > end > > However if the string contains multiple adjacent spaces, they may not > all be removed. This can be remedied by appending a ".gsub(/ +\n/,'')" to > the end of the existing gsub(). Why not just s.gsub(/(.{0,73}\S)(\s+|\Z)/,"\\1\n") (untested) -- Steck Dir Deine Erkenntnisse da hin wo sie hingeh�ren! Du kleiner\n verklemmter Hosenmatz!\nIch wette, Du bist picklig und f�r jede Frau abschreckend. Kein Wunder, da�\nDu Dich hier so produzierst. ["Lucrezia d`Lacroix" aka "Rebecca di Lorenzo" aka "Thomas Wendt"]