Use preg_match instead of Browscap::getBrowser() to avoid memory being exhausted