title: Replace last instance of comma with 'and' in a string
body: <p>I have a string of comma separated words e.g. <code>"a, b, c"</code>.<br>
  I need to replace the last comma instance with “and”, to make it look like <code>"a, b and c"</code>.</p>
  
  <p>I've tried using replaceFirst like this:  </p>
  
  <pre><code>"a, b, c".replaceFirst("(,)[^,]+$", " and")
  </code></pre>
  
  <p>But it doesn't work. It replaces everything after the last comma with “and” rather than just the comma producing <code>"a, b and"</code>.</p>
  
  <p>How to make it work?<br>
  I'm on java8. </p>
  
  <p>Ps. I thought that it's obvious, but it seems like I need to clarify, that I'm looking for a generic solution that works with any number of comma separated tokens, i.e. 'a, b, ...., c'</p>