• Модуль: support
  • Путь к файлу: ~/bitrix/modules/support/classes/general/search.php
  • Класс: CSupportSearch
  • Вызов: CSupportSearch::ParseQ
function ParseQ($q)
{
	$q = trim($q);
	if(strlen($q) <= 0)
	{
		return '';
	}
	$q=self::ParseStr($q, "^");

	$q = str_replace(
		array("&"   , "|"   , "~"  , "("  , ")", '"', "'"),
		array(" && ", " || ", " ! ", " (", ") ", ' " ', " ' "),
		$q
	);
	$q="($q)";
	$q = preg_replace("/\s+/".BX_UTF_PCRE_MODIFIER, " ", $q);

	return $q;
}