src/Router/Routes/Glob.php
protected function splitRoutePattern($pattern)
    {
        if (strpos($pattern, ' ') !== false && preg_match_all('/\s+\+(\w+)\b|\s+\-(\w+)\b/', $pattern, $matches)) {
            list($path) = preg_split('/\s+/', $pattern, 2);
            $inc = isset($matches[1]) ? array_filter($matches[1]) : [];
            $excl = isset($matches[2]) ? array_filter($matches[2]) : [];
        } else {
            $path = $pattern;
            $inc = [];
            $excl = [];
        }
        
        return [$path, $inc, $excl];
    }
protected function splitRoutePattern($pattern)
    {
        if (strpos($pattern, ' ') !== false && preg_match_all('/\s+\+(\w+)\b|\s+\-(\w+)\b/', $pattern, $matches)) {
            list($path) = preg_split('/\s+/', $pattern, 2);
            $inc = isset($matches[1]) ? array_filter($matches[1]) : [];
            $excl = isset($matches[2]) ? array_filter($matches[2]) : [];
        } else {
            $path = $pattern;
            $inc = [];
            $excl = [];
        }
        
        return [$path, $inc, $excl];
    }
protected function splitRoutePattern ( $ pattern ) { if ( strpos ( $ pattern , ' ' ) !== false && preg_match_all ( '/\s+\+(\w+)\b|\s+\-(\w+)\b/' , $ pattern , $ matches ) ) { list ( $ path ) = preg_split ( '/\s+/' , $ pattern , 2 ) ; $ inc = isset ( $ matches [ 1 ] ) ? array_filter ( $ matches [ 1 ] ) : [ ] ; $ excl = isset ( $ matches [ 2 ] ) ? array_filter ( $ matches [ 2 ] ) : [ ] ; } else { $ path = $ pattern ; $ inc = [ ] ; $ excl = [ ] ; } return [ $ path , $ inc , $ excl ] ; }
Split the route pattern in a path + inclusive and exclusive methods

@param string $pattern
@return array  [path, inc, excl]
Split the route pattern in a path + inclusive and exclusive methods