title: how to replace only one word in EditText
body: <p>in my app i have an EditText, that its text is "Hello my friend, Hello". how can i replace second hello with goodbye? i want to change its text to "Hello my friend, goodbye". i used replace() statement but replaces all hello words with goodbye. can i get letter index and use for replacing? for example i say to program that replace letters from 18 to 22 with goodbye.
  this is my code:</p>
  
  <pre><code>String text = edtText.getText().toString().replace("Hello", "goodbye");
  edtText.setText(text);
  </code></pre>