Andreas Schwarz wrote:
> Florian Frank wrote:
>> 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
> 
> No, it doesn't, but I've found this solution:

It doesn't work correctly, I have to think about it again...

-- 
AVR-Tutorial, ?ber 350 Links
Forum f?r AVRGCC und MSPGCC
-> http://www.mikrocontroller.net