title: Replace words in a string - Ruby
body: <p>I have a string in Ruby:</p>
  
  <pre><code>sentence = "My name is Robert"
  </code></pre>
  
  <p>How can I replace any one word in this sentence easily without using complex code or a loop?</p>