相关疑难解决方法(0)

C#Regex - 替换为自身

想要以编程方式使用HTML标记格式化文章.在文章中找到模式并将其自身替换为每侧附加的标签的最佳方法是什么?更具体地说,我如何thematch在以下示例中传递匹配:

string formattedArticle
    = Regex.Replace(article, "^\d.+", "<em>" + thematch + "</em>");
Run Code Online (Sandbox Code Playgroud)

c# regex replace

2
推荐指数
1
解决办法
1898
查看次数

标签 统计

c# ×1

regex ×1

replace ×1