title: How to parse number from middle of string
body: <p>I need to parse some numbers from a string, I can get the last number easily but wonder how to get the number mid string reliably. In this case the number 12?</p>
  
  <pre><code>var mystring = 'group 999999999 group-session-info 12 of 50';
  var i;
  var num; //how to get num "12"
  var numOf;
  i= mystring.lastIndexOf(" ");
  if (i != -1) {
     numOf= mystring.substr(i);
  }
  alert(numOf); // = 50
  </code></pre>
  
  <p>Thanks</p>