954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Remove Double Quotes " From A String

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.

evil_dude_01
Newbie Poster
15 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

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.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

Thank you kind sir, your are indeed a Genius.

evil_dude_01
Newbie Poster
15 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

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

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

Hi, dont know if you are interested or not but i finished my program.

Its a small program that opens the Firefox browser advert blocking filter file and converts the text into a format the the Maxthon browser can use.

If you want the program and source code its available at.

http://forum.maxthon.com/forum/index.php?act=ST&f=12&t=22041&st=0#entry139639

evil_dude_01
Newbie Poster
15 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You