title: JavaScript replace all instances not working in Chrome
body: <p>Chrome is failing to replace all instances of the '_' string with '/' and I'm not sure why. I've got the <code>g</code> global operator and <code>i</code> case-insensitive operator.</p>
  
  <pre><code>var sample_string = 'mail/contacts/add/';
  var p0 = sample_string.replace('_','/','gi');
  </code></pre>