Extracting specific text from select option boxes
<p>It's possible I'm just misusing .filter() here, but I've been trying to extract a particular piece of text from javascript option boxes without much success.</p>

<p>In short, each of my option boxes has a bunch of info, then, in brackets, ([x] items left in stock).</p>

<p>I'd like to extract that [x], but I can't seem to get any sort of regular expression filtering working in jQuery - or, perhaps, I'm doing it wrong.</p>

<p>In short, if anyone could complete the below, I'd be very appreciative:</p>

<pre><code>$('.productSelect').change(function() {
  selectedItem = $(this + 'option:selected').text();

  # Now grab the integer "x" inside the ([x] items left in stock) part of the text
  [ your code here]
});
</code></pre>

<p>Any help very appreciated.</p>
