- Set fso = CreateObject("Scripting.FileSystemObject")
- Set file = fso.OpenTextFile("a.txt",1)
-
- Do Until file.AtEndOfStream
- strLine = file.ReadLine
- If strLine <> "" Then
- strURL = strURL & GetURL(Split(strLine,"|||")) & vbCrLf
- End If
- Loop
-
- fso.CreateTextFile("b.txt",True).Write strURL
- MsgBox "OK"
-
- Function GetURL(ar)
- For i = 0 to UBound(ar)
- If InStr(LCase(str),LCase(ar(i)) & "|||") = 0 Then
- str = str & ar(i) & "|||"
- End If
- Next
- GetURL = Left(str,Len(str)-3)
- End Function
复制代码
|