On 05/01/2012 12:36 PM, botp wrote:
> another variant,
>> s=("a".."z").to_a.join 
> => "abcdefghijklmnopqrstuvwxyz"
>> "".tap{|o| s.each_char.with_index{|c,i| o << c if (i+1)%3 != 0 }} 
> => "abdeghjkmnpqstvwyz" kind regards -botp 

If you want to simply remove every third character in the string s:

0.step(s.size, 3).map {|n| s[n, 2]}.join

-- 
Lars Haugseth