| « | August 2026 | » | | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | | | | |
|
| 统计 |
blog名称: 日志总数:16 评论数量:33 留言数量:0 访问次数:71645 建立时间:2005年1月2日 |
| 
|
W3CHINA Blog首页 管理页面 写新日志 退出
如何从HTM文件中提取文本? |
Public Function StripText(Path As String, FileName As String, ExpandName As String) As StringDim f, ff, is_tag, write2file, iDim strTemp As StringDim t As StringOn Error Resume Nextf = FreeFileOpen Path & FileName & "." & ExpandName For Input As #f ' Open the HTML file in read modestrTemp = GetTempFile("txt"): StripText = strTempff = FreeFileOpen strTemp For Output As #ffDo While Not EOF(f)Line Input #f, twrite2file = ""For i = 1 To Len(t)Select Case Mid(t, i, 1)Case "<"is_tag = TrueCase ">"is_tag = FalseCase ElseIf Not is_tag Then write2file = write2file & Mid(t, i, 1)End SelectNextPrint #ff, write2fileLoopClose ffClose fClose f
|
阅读全文(2077) | 回复(1) | 编辑 | 精华 |
| 回复:如何从HTM文件中提取文本? |
|
ytang(游客)发表评论于2005/8/24 14:00:09 | very
good
!!
|
个人主页 | 引用回复 | 主人回复 | 返回 | 编辑 | 删除 |
» 1 »
|