title: replace double slash in javascript
body: <p>I'm working in a javascript function, in a given string I need to replace <code>//</code> for only one slash <code>/</code> by now I have:</p>
  
  <pre><code>result= mystring.replace("\/\/", "/");
  </code></pre>
  
  <p>bt it's not working, I still get the string with double slash, so which is the proper regex to indicate the double slash to the replace function?</p>
  
  <p>I already tried:</p>
  
  <ul>
  <li>!//!</li>
  <li>////</li>
  <li>///g///g</li>
  </ul>
  
  <p><strong>Edit:</strong>
  I'm using it to correct a URL that is saved in the string, for example,
  sometimes that URL can be something like: <code>mywebpage/someparameter//someotherparameter</code> and that double slash gives problem, so I need to replace it to one single slash like: <code>mywebpage/someparameter/someotherparameter</code></p>