Regex.Replace(content, "<[^<>]+?" + image[j].Groups["content"].Value.Replace(".", "\\.") + "(.|\n)+?>", "<img src=\"" + PicNetUrl + path + "\" onclick=\"javascript:window.open(this.src)\" alt=\"按此在新窗口浏览图片\" />"); Regex.Matches(content, "src\\=\"(?<content>.+?)\""); Regex.Replace(内容, "<[^<>]+?" +原图片地址.Replace(".", "\\.") + "(.|\n)+?>", "<img src=\"" + 替换后地址 + "\" onclick=\"javascript:window.open(this.src)\" alt=\"按此在新窗口浏览图片\" />"); MatchCollection image = Regex.Matches(dd, "<[^<]*src\\=[\"']?(?<content>.+?)[\"' >]{1}"); image[i].Groups["content"].Value//取值 相关文章: