title: Extracting data from a string
body: <p>I have a string and want to extract data from it.</p>
  
  <pre><code>$str = "Online (UVD) - 154,842 - Last Updated: Nov 23 2015 02:24 PM";
  </code></pre>
  
  <p>I want this <code>154,842</code> extract and this <code>2015</code> I've successfully extracted the first part. with this method</p>
  
  <pre><code>trim(str_replace("Online (UVD) - ", "", str_replace(",", "", substr_replace($str, "", strpos($str, " - Last Updated"))), $str))
  </code></pre>
  
  <p>Now, I'm unsure how to extract the other one. Data can vary for instance,</p>
  
  <pre><code>$str = "Online (UVD) - 1123123 - Last Updated: Nov 23 2015 02:24 PM";
  $str = "Online (UVD) - 12 - Last Updated: Nov 23 2015 02:24 PM";
  $str = "Online (UVD) - 1546546 - Last Updated: Nov 23 2015 02:24 PM";
  $str = "Online (UVD) - 3525252525 - Last Updated: Nov 23 2015 02:24 PM";
  </code></pre>
  
  <p>Is there a better method to extract?/</p>