谁帮我把下面这个匹配的东西,改为alt=xxx时也能匹配到alt啊    string altValue = "alt的值";
    protected void Page_Load(object sender, EventArgs e)
    {
        string s = "<img src='a.jpg' alt="nihao" /><img src='a.jpg' title='aaa' /><img src='b.jpg' /><img src='b.jpg' alt='aaa' /><img src='x.jpg' alt=xxx />";
        MatchEvaluator me = new MatchEvaluator(ABC);
        string r = Regex.Replace(s, @"(?is)<img[^>]*/>", ABC);
        Response.Write(Server.HtmlEncode(r));
    }
    private string ABC(Match match)
    {
        Match innerMatch = Regex.Match(match.Value, @"(?is)alt=(['""])(?<altValue>.*?)\1");
        if (innerMatch.Success)
        {
            if (innerMatch.Groups["altValue"].Value.Length > 0)
                return match.Value;
            else
                return Regex.Replace(match.Value, @"(?is)(?<=alt=['""]).*?(?=['""])", altValue);
        }        else
            return match.Value.Replace("/>", " alt='" + altValue + "'/>");
    }