Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace double quotes in a string?

Tags:

vbscript

I need to replace "in a string with nothing.

I tried:

replace(mystring, """, "")

I would like:

String = " "my string " " --> " my string"
like image 920
Zarcou Avatar asked Nov 26 '14 13:11

Zarcou


1 Answers

What you are really wanting to do is replace any instance " with a blank string. To do this:

replace(mystring, chr(34), "")

chr(34) is the character code for a double quote. You could also use replace(mystring, """", "") that """" gets evaluated as one double-quote character, but I believe the chr(34) is much less confusing.

like image 181
JNevill Avatar answered Oct 13 '22 00:10

JNevill