本帖最后由 apang 于 2015-3-25 23:29 编辑
好吧,7#仅仅转义斜杠字符不行,其它特殊字符也得转义,蛋疼
直接vbs好了- Set fso = CreateObject("Scripting.FileSystemObject")
- Set file = fso.OpentextFile("1.txt")
- s = fso.OpenTextFile("2.txt").ReadAll
- s = vbCrLf & LCase(s) & vbCrLf
- while Not file.AtEndOfStream
- s1 = file.ReadLine
- If InStr(s, vbCrLf & LCase(s1) & vbCrLf) = 0 Then
- s2 = s2 & s1 & vbCrLf
- End If
- wend
- fso.OpentextFile("3.txt", 2, true).Write s2
复制代码
|