title: How can I put [] (square brackets) in RegExp javascript?
body: <p>I'm trying this:</p>
  
  <pre><code>str = "bla [bla]";
  str = str.replace(/\\[\\]/g,"");
  console.log(str);
  </code></pre>
  
  <p>And the replace doesn't work, what am I doing wrong?</p>
  
  <p><strong>UPDATE</strong>: I'm trying to remove any square brackets in the string,
  what's weird is that if I do </p>
  
  <pre><code>replace(/\[/g, '')
  replace(/\]/g, '')
  </code></pre>
  
  <p>it works, but<br>
   <code>replace(/\[\]/g, '');</code> <br>doesn't.</p>