public static function getPattern($string = '', $delimiter = '#', $options = 'i', $strict = false)
    {
        $replacements = array(
            '.'         => '\\.',
            '*'         => '.*',
            $delimiter  => '\\'.$delimiter
        );
        return $delimiter.'^'
            .($strict ? '' : '.*')
            .strtr($string, $replacements)
            .($strict ? '' : '.*')
            .'$'.$delimiter.$options;
    }