Extracting time from string
<p>I have a string in the format of something like this: "7:18 am"</p>

<p>What I'd like to be able to do is extract the "718" (not the colon in between) and the "am" into two separate variables.</p>

<p>I tried doing something like this, but it only returned the first integer - in this case, the 7.</p>

<pre><code>var time = parseInt("7:18")
</code></pre>

<p>What would be the best way to accomplish this?</p>
