0

How to do a regex replace for this text:

    <span style=\"text-decoration: underline;\">Request Block Host</span> to

    `<u>Request Block Host</u>`

So far, I have this, assume "text" is the complete string that has the above tag.

   text = Regex.Replace(text, "<span style=\"text-decoration: underline;\">.*?</span>", delegate(Match mContent)
        {
            return mContent.Value.Replace("<span style=\"text-decoration: underline;\">", "<u>").Replace("</span>", "</u>");
        }, RegexOptions.IgnoreCase);      
4

2 に答える 2