]+src\s*=\s*([\'"])((?:(?!\1).)*)\1[^>]*>/i', function($matches) { $src = $matches[2]; if (!empty($src) && !str_starts_with($src, 'http')) { // 保留原始标签,只替换src属性 return str_replace($src, image_domain_concat($src), $matches[0]); } return $matches[0]; }, $html ); } }