Converting JS RegEx To PHP Not Working
<p>I had this JS/jQuery:</p>

<pre><code>$(this).text().replace(/([^\s]+)/, day);    
</code></pre>

<p>which took a line like <code>MAR/26/2013 05:00 PM</code> and converted it to <code>05:00 PM</code>.</p>

<p>But this PHP does not do a proper replacement for some reason:</p>

<pre><code>$time = preg_replace('/([^\s]+)/', '', $dateStr);
</code></pre>

<p>Instead I am left with a string containing one space.</p>

<p>I converted all of my code flawlessly up until the aforementioned line. <code>$(this).text()</code> has the same value as <code>$dateStr</code>.</p>
