src/Leevel/Router/Match/Annotation.php
protected function matcheRegexGroups(array $routers)
    {
        $pathInfo = $this->getPathInfo();

        foreach ($routers['regex'] as $key => $regex) {
            if (!preg_match($regex, $pathInfo, $matches)) {
                continue;
            }

            $matchedRouter = $routers['map'][$key][count($matches)];
            $routers = $routers[$matchedRouter];
            $matcheVars = $this->matcheVariable($routers, $matches);

            return $this->matcheSuccessed($routers, $matcheVars);
        }

        return false;
    }
protected function matcheRegexGroups(array $routers)
    {
        $pathInfo = $this->getPathInfo();

        foreach ($routers['regex'] as $key => $regex) {
            if (!preg_match($regex, $pathInfo, $matches)) {
                continue;
            }

            $matchedRouter = $routers['map'][$key][count($matches)];
            $routers = $routers[$matchedRouter];
            $matcheVars = $this->matcheVariable($routers, $matches);

            return $this->matcheSuccessed($routers, $matcheVars);
        }

        return false;
    }
匹配路由正则分组.

@param array $routers

@return array|false