protected function _quoteRegex($string, $delimiter = null)
    {
        $string    = $this->_normalizeString($string);
        $delimiter = is_null($delimiter) ? null : $this->_normalizeString($delimiter);

        return preg_quote($string, $delimiter);
    }
protected function _quoteRegex($string, $delimiter = null)
    {
        $string    = $this->_normalizeString($string);
        $delimiter = is_null($delimiter) ? null : $this->_normalizeString($delimiter);

        return preg_quote($string, $delimiter);
    }
protected function _quoteRegex ( $ string , $ delimiter = null ) { $ string = $ this -> _normalizeString ( $ string ) ; $ delimiter = is_null ( $ delimiter ) ? null : $ this -> _normalizeString ( $ delimiter ) ; return preg_quote ( $ string , $ delimiter ) ; }
Escapes special characters in a string such that it is interpreted literally by a PCRE parser.

@since [*next-version*]

@param string|Stringable      $string    The string to quote.
@param string|Stringable|null $delimiter The delimiter that will be used in the expression, if any.
If specified, this delimiter will be quoted too.

@throws InvalidArgumentException If the string or the delimiter are invalid.

@return string The quoted string.
Escapes special characters in a string such that it is interpreted literally by a PCRE parser .