- Set fso = CreateObject("Scripting.FileSystemObject")
- text = fso.OpenTextFile("a.txt",1).ReadAll
- With New RegExp
- .Pattern = "(.*?ok )(.*)"
- .IgnoreCase = True
- .Global = True
- text = .Replace(text,"$2")
- End With
- fso.OpenTextFile("b.txt",2,True).Write text
复制代码
|