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';
    }
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';
    }
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' ; }
Prepare a regex pattern.

@param string $patt
@param bool $strict

@return string
Prepare a regex pattern .