title: remove the specific character in the string using javascript
body: <ul>
  <li><p>I have one string</p>
  
  <pre><code> var tStr="[[[{"Name":"A","No":"8000444284"}],{"Name":"B","No":"8485990983"}],{"Name":"C","No":"0000000000"}]";
  </code></pre></li>
  <li><p>In this string i try to remove all <code>[</code> and <code>]</code></p></li>
  </ul>
  
  <p>My Code is:</p>
  
  <pre><code>function trim(str, characters) 
  {
    var c_array = characters.split('');
    var result  = '';
    for (var i=0; i &lt; characters.length; i++)
      result += '\\' + c_array[i];
    return str.replace(new RegExp('^[' + result + ']+|['+ result +']+$', 'g'), '');
  }
  </code></pre>
  
  <p>And this Function Use as </p>
  
  <pre><code>trim(str,'[ ]');
  </code></pre>
  
  <p>In Calling <code>var tStr="[[[{"Name":"A","No":"8000444284"}],{"Name":"B","No":"8485990983"}],{"Name":"C","No":"0000000000"}]";</code></p>
  
  <p>thats not working please any one help me...:)</p>