Use "sub", and the non-greedy operator: "?"

"M.raja.gopalan".sub(/(.*?)\./,'')

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