title: regex replace just the last charater of a string
body: <p>This should be an easy one and I couldn't find it anywhere.
  How do I replace just the last character of a string with a char from an array?</p>
  
  <pre><code>str1 = str1.replace(?????, myArray[b]);
  </code></pre>