src/includes/classes/Core/SearchTermHighlighter.php
protected function parseTerms(string $q): array
    {
        if (!$q) { // Query is empty?
            return []; // No terms.
        }
        $terms = []; // Initialize.

        if (preg_match_all('/"(?<phrase>[^"]+)"/u', $q, $_m)) {
            $q = preg_replace('/"(?:[^"]+)"/u', '', $q);

            foreach ($_m['phrase'] as $_phrase) {
                $terms[] = $_phrase; // As a single term.
            } // unset($_m, $_phrase); // Housekeeping.
        } // Quotes are stripped BEFORE special chars below.

        $q = preg_replace('/\-\w+/u', '', $q);
        $q = preg_replace('/[~+](\w+)/u', '${1}', $q);
        $q = preg_replace('/[()*<>]+/u', '', $q);

        $terms        = array_merge($terms, preg_split('/\s+/', $q));
        $terms        = $this->c::removeEmptys($this->c::mbTrim($terms));
        return $terms = array_unique($terms);
    }
protected function parseTerms(string $q): array
    {
        if (!$q) { // Query is empty?
            return []; // No terms.
        }
        $terms = []; // Initialize.

        if (preg_match_all('/"(?<phrase>[^"]+)"/u', $q, $_m)) {
            $q = preg_replace('/"(?:[^"]+)"/u', '', $q);

            foreach ($_m['phrase'] as $_phrase) {
                $terms[] = $_phrase; // As a single term.
            } // unset($_m, $_phrase); // Housekeeping.
        } // Quotes are stripped BEFORE special chars below.

        $q = preg_replace('/\-\w+/u', '', $q);
        $q = preg_replace('/[~+](\w+)/u', '${1}', $q);
        $q = preg_replace('/[()*<>]+/u', '', $q);

        $terms        = array_merge($terms, preg_split('/\s+/', $q));
        $terms        = $this->c::removeEmptys($this->c::mbTrim($terms));
        return $terms = array_unique($terms);
    }
Highlight.

@since 161007 Highligher.

@param string $q Search query.

@return array Search terms.

@see http://jas.xyz/2dkGVEj MySQL boolean syntax.