回复 5# 1270697389
"s/<br>/\n/g" 把字符串<br>全部替换成换行
"s/<font[^\n]*\n//g" 把从<font到换行符之间的字串替换成空(就是删除)
vbs记得以前给你写过多次,翻一翻旧帖就有- Set fso = CreateObject("Scripting.FileSystemObject")
- txt = fso.OpenTextFile("1.txt").ReadAll
- Set re = New RegExp
- re.Pattern = "<font.*?<br>"
- re.Global = True
- re.IgnoreCase = True
- fso.OpenTextFile("2.txt",2,True).Write re.Replace(txt,"")
复制代码
|