Возвращает true если browser = Netscape 2, 3 or MSIE 3.
preg_match("/(ozilla.[23]|MSIE.3)/i", $_SERVER["HTTP_USER_AGENT"]);
// Places three space separated words into $regs[1], $regs[2] and $regs[3].
preg_match("/([[:alnum:]]+) ([[:alnum:]]+) ([[:alnum:]]+)/i", $string, $regs);