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.

Thank you kind sir, your are indeed a Genius.

;), and uh, the ten character post limit!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.