title: JavaScript String.replace()
body: <p>The following replacement</p>
  
  <pre><code>"index.html".replace('\.html$', '_fr.html');
  </code></pre>
  
  <p>returns "index.html", indicating that the first argument didn't match anything. However, if I remove the "$"</p>
  
  <pre><code>"index.html".replace('\.html', '_fr.html');
  </code></pre>
  
  <p>then the first argument matches and "index_fr.html" is returned.</p>
  
  <p>Returning to the first example, can someone explain why ".html$" does not seem to match "index.html"?</p>