function check_link($str){ $patten = "/<a.*?href\s*?=\s*?[\"\'](.*?)[\"\'].*?>(.*?)<\/a>/is"; preg_match_all($patten,$str,$match); return $match;}