title: How to do a global replace on backslash in a string in javascript
body: <p>I've tried: (Incase all the slashes make it hard to read, 1st line should replace forward slashes, 2nd line should replace backslashes, 3rd line should replace asterisks.</p>
  
  <pre><code>newbigbend = bb_val.replace(/\//gi,"");
  newbigbend = bb_val.replace(/\\/gi,"");
  newbigbend = bb_val.replace(/*/gi,"");
  </code></pre>
  
  <p>to replace all forward slashes, backslashes and asterisks. But when the browser gets to the middle line <code>newbigbend = bb_val.replace(/\\/gi,"");</code> it thinks its an unterminated comment. I know to use the escape to replace the forward slash. Not sure about back.</p>