On 2003-08-23 03:18:26 +0900, Andreas Schwarz wrote:
> def wrap(s)
>   return s.gsub(/.{1,74}(?:\s|\Z)/){($& + 5.chr).
>     gsub(/\n\005/,"\n").gsub(/\005/,"\n")}
> end
> 
> Any hints how I can change the function so that it doesn't touch lines
> with quoting characters (">", "|") in the beginning?

This should do the job:

def wrap(s)
  return s.gsub(/^[^>|].{0,74}(?:\s|\Z)/){($& + 5.chr).
    gsub(/\n\005/,"\n").gsub(/\005/,"\n")}
end

-- 
I have long suspected a cozy little link between virus writers and
antivirus software makers. The latter certainly needs the former, both to
keep viruses in the news and to provide a steady revenue stream from updates.
  -- Bruce Schneier, CRYPTO-GRAM, July 15, 2002