Hi can anyone tell me if i can write a string to a text file without it having the " Quotes at either side of the text "?

I'm trying to input a line of text from a text file, change it and rewrite it.

Example

//(adt|dclk)\./
//ccas(\.clearchannel|_media/)/

would become

url1*//(adt|dclk)\./*
url2*//ccas(\.clearchannel|_media/)/*

The problem is when ever i write out to file it is in quotes.

"url1*//(adt|dclk)\./*"
"url2*//ccas(\.clearchannel|_media/)/*"

Any help would be appreciated

Thank you.

What method exactly are using to write to the file? You have posted no code, but I'm guessing that you are using "write" to write the information to the file. Change your write command to print. print #1, "your data" should work fine. Here is the code example that I just built to test this theory, (which was successful):

Private Sub Form_Load()
Open "c:\output.txt" For Output As #1
    Write #1, "write test"
    Print #1, "print test"
Close #1

For Each XFrm In Forms
    Unload XFrm
Next XFrm
End Sub

This works great on my box. I'm pretty sure that this idea spans as far back as QBasic, but I'm not sure if it goes on through .NET (since I don't use .NET). Let me know if this helps to solve your problem.

This question has already been answered. Start a new discussion instead.