title: match end of line javascript regex
body: <p>I'm probably doing something very stupid but I can't get following regexp to work in Javascript:</p>
  
  <pre><code>pathCode.replace(new RegExp("\/\/.*$","g"), "");
  </code></pre>
  
  <p>I want to remove // plus all after the 2 slashes.</p>