jQuery split text
<p>I have a credit card field that populates a <code>&lt;span&gt;</code> tag e.g</p>

<pre><code>&lt;span&gt;****-****-****-1111 (Expires 12/2012)&lt;/span&gt;
</code></pre>

<p>I need to extract the date and find out if it is in the past.</p>

<p>At the moment I have the below jQuery but I'm stuck at the point of split() to extract just the date.</p>

<pre><code>var $selectedDate = $('.prev-card .chzn-container .chzn-single span').text().split();
var $now = new Date();
if ($selectedDate &lt; $now) {
    alert('past')
}
else{
    alert('future')
}
</code></pre>

<p>I think that covers everything but feel free to ask for more info</p>
