正则计算字符串出现次数最优解

计算字符串中指定字符串的出现次数,使用Regex类是高效便捷的解决方案。相比使用替换方法,正则表达式占用资源更少。

rar
Regex.rar 预估大小:3个文件
folder
Regex 文件夹
file
Default.aspx 950B
folder
App_Data 文件夹
file
web.config 8KB
file
Default.aspx.cs 1KB
rar 文件大小:3.57KB