title: how to remove id with braces from a string in javascript
body: <p>My option looks like this:</p>
  
  <pre><code>&lt;option value="80"&gt;a1, a2, a3, a4, a5 (80)&lt;/option&gt;
  </code></pre>
  
  <p>With this code:</p>
  
  <pre><code>str_split = str.split(',');
  </code></pre>
  
  <p>i receive this:</p>
  
  <pre><code>a1 a2 a3 a4 a5 (80)
  </code></pre>
  
  <p>But i want to remove the id with the braces to get this:</p>
  
  <pre><code>a1 a2 a3 a4 a5
  </code></pre>
  
  <p>The id can vary like <code>"(8)"</code> or <code>"(20)"</code> or <code>"(100)"</code> and so on..</p>
  
  <p><br/>
  I tried it with </p>
  
  <pre><code>str_replace = str.replace(/[()]/g, "");
  </code></pre>
  
  <p>but it gives me this result:</p>
  
  <pre><code>a1 a2 a3 a4 a5 80
  </code></pre>
  
  <p>How do I do that?</p>
  
  <p><strong>EDIT :</strong> </p>
  
  <p>is it possible to do this with the last braces with id from string?</p>
  
  <p>just tested it and got problems when my option looks like this</p>
  
  <pre><code>&lt;option value="80"&gt;a1(12), a2(test), a3(333), a4(xx), a5(34) (80)&lt;/option&gt;
  </code></pre>
  
  <p>i want this </p>
  
  <pre><code>a1(12) a2(test) a3(333) a4(xx) a5(34)
  </code></pre>