ubb代碼轉(zhuǎn)化html代碼 發(fā)表時(shí)間:2024-06-02 來(lái)源:明輝站整理相關(guān)軟件相關(guān)文章人氣: [摘要]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, @"\ | |