ubb代码转化html代码 发表时间:2024-06-02 来源:明辉站整理相关软件相关文章人气: [摘要]public static string UbbDecode(string str) str = HtmlEncode(str); str = Regex.Replace(str, @"\(?<url>.+?)\", "<a href='u... public static string UbbDecode(string str) { str = HtmlEncode(str); str = Regex.Replace(str, @"\(?<url>.+?)\", "<a href='${url}' target=_blank>${url}</a>", RegexOptions.Compiled RegexOptions.IgnoreCase); str = Regex.Replace(str, @"\(?<name>.+?)\", "<a href='${url}' target=_blank>${name}</a>", RegexOptions.Compiled RegexOptions.IgnoreCase); str = Regex.Replace(str, @"\(?<email>.+?)\", "<a href='mailt${email}' target=_blank>${email}</a>", RegexOptions.Compiled RegexOptions.IgnoreCase); str = Regex.Replace(str, @"\(?<name>.+?)\", "<a href='mailt${email}' target=_blank>${name}</a>", RegexOptions.Compiled RegexOptions.IgnoreCase); str = Regex.Replace(str, @"\ | |