protected function prepare($patt, $strict = true)
    {
        // Fix group if it has an optional path on start
        if (substr($patt, 0, 3) == '/(/') {
            $patt = substr($patt, 1);
        }

        return '~^' . $patt . ($strict ? '$' : '') . '~i';
    }