我在這頁使用這段代碼,逐行讀取數據。現在我怎麼可以逐行編輯文本文件? (VB6) Reading text files line by line looking for specific words If InStr(1, lines(i), "sample text", vbTextCompare) Then
lines (i)= "new text"
我用這個代碼,但沒有任何改變
我有一個文本文件foo.txt的,看起來像寫回同一個文件: I dont care!
pattern and stuff
this line : to_edit
this line : no_edit
some other lines
this line : to_edit
pattern and stuff
another line : to_edit
another line