Написать функцию, выделяющую из строки содержимое всех html-тегов
(Отметьте один правильный вариант ответа.)
Варианты ответа
function GetTags($str){ preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/", $str, $matches); return $matches[0];} (Верный ответ)
function GetTags($str){ $res = preg_match_all ("/(<(\w+)[^>]*>)(.*)(<\/\\2>)/", $str, $matches); return $res;}
function GetTags($str){ preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\w+>)/", $str, $matches); return $matches[0];}