Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace " (double quotes)

Status
Not open for further replies.

timtom

Programmer
Jul 12, 2001
78
0
0
GB
I started a new thread because my problem had changed slightly :)

I need to Replace or Remove all the " (double quotes) in a string. If I do

mystring = Replace(mystring,""", "")

then I get an undetermined string constant error.
Does anyone know of another way? I can't find anything in my books.

Thanks again
Sarah

p.s. To clarify, the string is a long string comprising lots of HTML - I can live without any of the double quotes contained therein.
User_timtom.jpg
[sub]WASN'T FIT ENOUGH FOR THE POLICE FORCE[/sub]​
 
mystring = Replace(mystring,"""", "")

Hope it will work!
Durug
 
Yes it does! Thanks Durug, much appreciated. :)
User_timtom.jpg
[sub]WASN'T FIT ENOUGH FOR THE POLICE FORCE[/sub]​
 
Hey timtom...

If you find you are working with lots and lots of double quotes, the """" way can get quite messy.

An alternative is to use:
mystring = Replace(mystring, Chr(34), "")

But like I said, its only really a benefit for cases involving lots and lots of double quotes! Brett Birkett B.Comp
Systems Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top