code: function extractVersion(uastring, expr, pos) {
    var match = uastring.match(expr);
    return match && match.length >= pos && parseInt(match[pos], 10);
  }
docs: Extract browser version out of the provided user agent string.
  
  @param {!string} uastring userAgent string.
  @param {!string} expr Regular expression used as match criteria.
  @param {!number} pos position in the version string to be returned.
  @return {!number} browser version.