• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/textparser.php
  • Класс: CTextParser
  • Вызов: CTextParser::detectTags
public function detectTags($text)
{
	$result = [];

	$text = str_replace((Application::isUtfMode() ? "xC2xA0" : "xA0"), ' ', $text);

	if (preg_match_all($this->getTagPattern(), ' ' . $text, $matches))
	{
		$result = array_unique($matches[2]);
	}

	$result = array_map(
		function($tag) { return CTextParser::cleanTag($tag); },
		$result
	);

	$result = array_filter(
		$result,
		function($tag) { return $tag != ''; }
	);

	return $result;
}