title: Cannot Replace string in Javascript
body: <p>I have a string like this "[[String1]],[[String2]],[[String3]]". I need to remove all square brackets. For this I used the replace function in Javascript. </p>
  
  <pre><code>var str = "[[String1]],[[String2]],[[String3]]";
  var str1 = str.replace(/[[/g,''); //not working
  var str2 = str1.replace(/]]/g,''); //working
  </code></pre>
  
  <p>Can anyone help me with this problem.</p>