'oogoooglogic'.scan(/o+/).max.length #=> 3

-- 
Posted via http://www.ruby-forum.com/.