62,046
社区成员
发帖
与我相关
我的任务
分享
/* {Ky_频道推荐} {Ky_用户登陆} 替换模板 */
private void ReplaceLabelNameToContent(StringBuilder fileContent)
{
MatchCollection matchs = Regex.Matches(fileContent.ToString(), "{Ky_.*?}", RegexOptions.IgnoreCase);
foreach (Match match in matchs)
{
string newValue = string.Empty;
if (match.Value.ToLower().StartsWith("{ky_s_"))
{
newValue = this.GetSuperLabel(match.Value, -1);
}
else
{
newValue = this.GetLabelContent(match.Value);
}
fileContent.Replace(match.Value, newValue);
}
}