Hello ,
I tried a code which reads the file InputFile.txt (attached) grep particular values and write it to a file in a desired output format is in file OutputFile.txt
Below is the code partially I have done..
Help me on correcting my code to get to my desired output as in file OutputFile.txt.
I tried a code which reads the file InputFile.txt (attached) grep particular values and write it to a file in a desired output format is in file OutputFile.txt
Below is the code partially I have done..
Code:
Dim re, targetString, colMatch, objMatch, nMT Set objFS = CreateObject("Scripting.FileSystemObject") Set rs = New RegExp strFileIN = "..\Inputfile.txt" strFileOUT = "..\Outputfile.txt" With rs .Pattern = "\w+\(\w\.+\)" & "\w+\(\w+\)" .Global = True .IgnoreCase = True End With Set objFile = objFS.OpenTextFile(strFileIN) strText = objFile.ReadAll Set colMatch = rs.Execute(strText) Set objOutFile = objFS.CreateTextFile(strFileOUT,True) For nMT = 0 To colMatch.Count - 4 objOutFile.WriteLine colMatch(nMT + 0) &" "& colMatch(nMT + 1) &" "& colMatch(nMT + 2) &" "& colMatch(nMT + 3) Next objOutFile.Close
Comment