Quantcast
Channel: how to replace a word in specific line in text file
Viewing all articles
Browse latest Browse all 5

how to replace a word in specific line in text file

$
0
0

in text file i have multiline

so i want in of each line where "faux" will be replaced with "ok"

1 abc abc abc 5 6  faux

2 abc abc abc 5 6 faux

with the number that i have i will change faux with ok

something like this but with point to the number that i put it in first place of line

My.Computer.FileSystem.WriteAllText(TextBox1.Text, My.Computer.FileSystem.ReadAllText(TextBox1.Text).Replace("faux", "ok"), False)



Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>