using System.Text.RegularExpressions;
public static void Main()
string old_str = @"<span style=""font-weight:underline;"">John</span> <span style=""font-style: underline;"">Steve</span> <span style=""text-decoration: underline;"">Abrahem</span>";
string new_str = Regex.Replace(old_str, "<.*?>(.*?)<.*?>", new MatchEvaluator(Replace));
Console.WriteLine(new_str);
static string Replace(Match m)
return "<ul>" + m.Groups[1] + "</ul>";