I have some code that I learnt from Stack Overflow that finds specific text in a .txt file and replaces it with different text. In the code below it looks for the number '14' and replaces it with '8'. I'm pretty sure I understand how this code works after reading around this forum, so thanks for that.
Where I'm stuck is I then want it to repeat the process looking for a different number and replacing it but I can't figure out how to add a second function into the same set of code. I'm assuming it needs an 'if' or a 'do' but I'm a total beginner. Happy to learn anything you have.
Set objFS = CreateObject("Scripting.FileSystemObject")
strFile = "C:\file.txt"
Set objFile = objFS.OpenTextFile(strFile)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
If InStr(strLine,"14")> 0 Then
strLine = Replace(strLine,"14","8")
End If
WScript.Echo strLine
Loop