/*** 获取富文本编译器中的所有图片* @param string $contentStr* @return array*/
function getPatternMatchImages($contentStr = "")
{$img_src_arr = [];$pattern_imgTag = '/<img\b.*?(?:\>|\/>)/i';preg_match_all($pattern_imgTag,$contentStr,$match_img);if (isset($match_img[0])){foreach ($match_img[0] as $key => $img_tag){$pattern_src = '/\bsrc\b\s*=\s*[\'\"]?([^\'\"]*)[\'\"]?/i';preg_match_all($pattern_src,$img_tag,$matchSrc);if (isset($matchSrc[1])){foreach ($matchSrc[1] as $src){$img_src_arr[] = $src;}}}}return $img_src_arr;
}