title: RegEx to detect OS version in JavaScript
body: <p>Getting the information from the HTTP User-Agent header using navigator.userAgent in JavaScript we get things like this (using different OS and browsers):</p>
  
  <pre><code>"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12"
  
  "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7"
  
  "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.7) Gecko/2009030423 Ubuntu/8.10 (intrepid) Firefox/3.0.7"
  
  "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7"
  
  "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16"
  </code></pre>
  
  <p>As you can see the OS version is the group of numbers before the third semicolon;</p>
  
  <p>I need a javascript regex to get his numbers.</p>
  
  <p>Thank you very much.</p>