[摘要]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, @"\