protected function matchBrowser(array $regexes, $string)
    {
        // Build regex that matches phrases for known browsers (e.g. "Firefox/2.0" or "MSIE 6.0").
        // This only matches the major and minor version numbers (e.g. "2.0.0.6" is parsed as simply "2.0").
        $pattern = '#('.join('|', $regexes).')[/ ]+([0-9]+(?:\.[0-9]+)?)#i';

        if (preg_match($pattern, $string, $matches)) {
            return $matches;
        }

        return false;
    }