Just noticed the Gsub is wrong, it should be:

  t = t.gsub( /(<object(.|\n)+?<\/object>)/ , 
"<notextile>\\1</notextile>")


Still not problem solved though.
-- 
Posted via http://www.ruby-forum.com/.