text = Regex.Replace(text, "\\[B\\](?<boldText>.*)\\[/B\\]",
"<b>${boldText}</b>", RegexOptions.IgnoreCase);
// 替换下划线
text = Regex.Replace(text, "\\[U\\](?<underlineText>.*)\\[/U\\]",
"<u>${underlineText}</u>", RegexOptions.IgnoreCase);
// 替换斜体
text = Regex.Replace(text, "\\[I\\](?<italicText>.*)\\[/I\\]",
"<i>${italicText}</i>", RegexOptions.IgnoreCase); // 替换居中
text = Regex.Replace(text, "\\[center\\](?<centerText>.*)\\[/center\\]",
"<center>${centerText}</center>", RegexOptions.IgnoreCase);
// 替换超级链接
text = Regex.Replace(text, "\\[url=(?<url>.*)\\](?<urltext>.*)\\[/url\\]",
"<a href='${url}'target='_blank'>${urltext}</a>", RegexOptions.IgnoreCase);
// //[email]
text = Regex.Replace(text, "\\[email=(?<email>.*)\\](?<txtText>.*)\\[/email\\]",
"<a href='mailto:${email}' target='_blank'>${txtText}</a><br/>", RegexOptions.IgnoreCase); //[fly]
text = Regex.Replace(text, "\\[fly\\]",
"<marquee width=90% behavior=alternate scrollamount=3>", RegexOptions.IgnoreCase);
text = Regex.Replace(text, "\\[/fly\\]",
"</marquee>", RegexOptions.IgnoreCase);
//[move]
text = Regex.Replace(text, "\\[move\\]",
"<marquee scrollamount=3>", RegexOptions.IgnoreCase);
text = Regex.Replace(text, "\\[/move\\]",
"</marquee>", RegexOptions.IgnoreCase); //[grow]
text = Regex.Replace(text, "\\[glow=(?<gwidth>.*)\\,(?<gcolor>.*)\\,(?<gsr>.*)\\](?<txtText>.*)\\[/glow\\]", "<table width=${gwidth} style='filter:glow(color=${gcolor}, strength=${gsr})'>${txtText}</table>", RegexOptions.IgnoreCase);
//
// //[shadow]
text = Regex.Replace(text, "\\[shadow=(?<gwidth>.*)\\,(?<gcolor>.*)\\,(?<gsr>.*)\\](?<txtText>.*)\\[/shadow\\]","<table width=${gwidth} style='filter:shadow(color=${gcolor}, strength=${gsr})'>${txtText}</table>", RegexOptions.IgnoreCase);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货