public static function getParameterName($segment)
        {
            $name = mb_substr($segment, 1);

            $optMarkerPos = mb_strpos($name, '?');
            $regexMarkerPos = mb_strpos($name, '|');

            if ($optMarkerPos !== false && $regexMarkerPos !== false) {
                if ($optMarkerPos < $regexMarkerPos) return mb_substr($name, 0, $optMarkerPos);
                else return mb_substr($name, 0, $regexMarkerPos);
            }

            if ($optMarkerPos !== false) return mb_substr($name, 0, $optMarkerPos);

            if ($regexMarkerPos !== false) return mb_substr($name, 0, $regexMarkerPos);

            return $name;
        }