protected function pregQuote($value, $delimiter = '/')
    {
        if (is_array($value) || is_object($value)) {
            foreach ($value as &$_value) {
                $_value = $this->pregQuote($_value, $delimiter);
            } // unset($_value); // Housekeeping.
            return $value;
        }
        return preg_quote((string) $value, (string) $delimiter);
    }
protected function pregQuote($value, $delimiter = '/')
    {
        if (is_array($value) || is_object($value)) {
            foreach ($value as &$_value) {
                $_value = $this->pregQuote($_value, $delimiter);
            } // unset($_value); // Housekeeping.
            return $value;
        }
        return preg_quote((string) $value, (string) $delimiter);
    }
protected function pregQuote ( $ value , $ delimiter = '/' ) { if ( is_array ( $ value ) || is_object ( $ value ) ) { foreach ( $ value as & $ _value ) { $ _value = $ this -> pregQuote ( $ _value , $ delimiter ) ; } // unset($_value); // Housekeeping. return $ value ; } return preg_quote ( ( string ) $ value , ( string ) $ delimiter ) ; }
Escapes regex special chars deeply.

@since 140417 Initial release.

@param mixed  $value     Input value.
@param string $delimiter Delimiter.

@return string|array|object Escaped string, array, object.
Escapes regex special chars deeply .