Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

New line when writing to text file

$
0
0
I want my program to read through a text file and insert a new line in the file every time it finds the letter "v".

text file: "v 100 200 300v 20 goop glopv 300 2.9"
Output:
"
v 100 200 300
v 20 goop glop
v 300 2.9"

here is what I have so far:

fso = CreateObject("Scripting.FileSystemObject")
            inputFile = fso.OpenTextFile(ofd.FileName, 1)
            str = inputFile.ReadAll
str = Replace(str, "v", "*new line* & "v")



Thanks. :)/>

Viewing all articles
Browse latest Browse all 51036

Trending Articles



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