惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Vercel News
Vercel News
F
Fortinet All Blogs
B
Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
月光博客
月光博客

博客园 - habin

利用KindEditor实现公司通讯录的维护 在winform嵌入外部应用程序 Devexpress RichEditControl 导入word文件后字体变为方正姚体的解决方案 Js下载文件到本地(兼容多浏览器) 解决lhgDialog插件在IE11浏览器的BUG Devexpress ChartControl 柱状图简单例子 解决“远程会话已断开连接,因为访问被拒绝导致许可证存储的创建失败,请使用提升的权限运行远程桌面客户端”问题 MVC项目初次发布到IIS可能会遇到的问题 Android Studio下载及离线升级方法 动态调用WebService 不能在 Page 回调中调用 Response.Redirect 解决方法 JQuery TextExt 控件使用 替换文本框title提示文本 通过ashx获取JSON数据的两种方式 终于解决SQL Server 2008 64位系统无法导入Access/Excel的问题 2012/08/01 Asp.net项目部署ActiveReport jQuery Mobile对话框插件 JS实现日期比较 Apache根目录运行.net网站
统计某个单词出现次数
habin · 2013-03-13 · via 博客园 - habin
'引用Microsoft VBScript Regular Expressions 1.0

'统计单词出现次数 Private Function TongJi(ByVal T_txt As String) As Long Dim cnt As Long Dim re As RegExp Dim mhs As MatchCollection Set re = New RegExp re.IgnoreCase = False re.Global = True Dim strLine As String Open "C:\1.log" For Input As #1 Do Until EOF(1) Line Input #1, strLine re.Pattern = T_txt Set mhs = re.Execute(strLine) cnt = cnt + mhs.Count Loop Close #1 TongJi = cnt End Function Private Sub Command1_Click() Dim e As Long e = TongJi(Text1.Text) Cls List1.AddItem Text1.Text & " 出现过: " & e & " 次" End Sub