Mega Code Archive

 
Categories / Ruby / String
 

FOO bar gsub(fooi, The bar) gsub(barm, result)

puts "FOO bar".gsub(/foo/i, "The bar").gsub(/bar/m, "result")