remove text in parentheses and the parentheses using .filter() or .slice()
<p>i have a table with code like this:</p>

<pre><code> &lt;tr&gt;
               &lt;th scope="row"&gt;5-17&lt;/th&gt;
               &lt;td&gt;23.6 (22.0-24.0)&lt;/td&gt;
               &lt;td&gt;18.0 (17-20.0)&lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
               &lt;th scope="row"&gt;Total 0-17&lt;/th&gt;
               &lt;td&gt;20.6 (8-15.6)&lt;/td&gt;
               &lt;td&gt;16.1 (22.2-24.0)&lt;/td&gt;
           &lt;/tr&gt;
</code></pre>

<p>i am using the following function to find the contents of the table cells and bring it into an array:</p>

<pre><code>var l1 =   $('#datatable td:nth-child(2)').map(function() {
     return $(this).text();
    }).get();
</code></pre>

<p>the table fragment's id is "datatable".</p>

<p>this returns properly, however i am putting this array into jqPlot and it cant read the stuff between the parentheses or the parentheses themselves.</p>

<p>i need the data to remain in the table however because we are displaying both the table and the chart.</p>

<p>i cant reformat (add spans around the content i want to remove etc) because these tables are being generated by another piece of software.</p>

<p>i think what i need to do is either slice off after the space or use a regex to find and remove. not sure how to proceed with either of these. thanks!</p>
