Mega Code Archive
Categories
/
Ruby
/
Development
Replace every occurrence of Perl and Python with Ruby
line = "this is a Perl. And this a Python" puts line line.gsub(/Perl|Python/, 'Ruby') puts line