View Full Version : Replace Quotes....
tsbarnes
01-15-2003, 03:51 PM
I am trying to run a replace on a variable but have been unsuccessful when there are quotes in the variable. I do not get an error but it leaves the quotes in the variable.
For example:
VariableOne = JKL"#
My outPut would be JKL"
How do I get rid of the quotes?
Thanks,
tsbarnes
arnyinc
01-15-2003, 04:42 PM
Where are you getting the data from? VariableOne = JKL"# is an invalid declaration.
You may need to use double quotes
<%
myvar = "JKL""#"
response.write myvar&"<br>"
myvar=replace(myvar, """", "")
response.write myvar
%>
tsbarnes
01-15-2003, 10:09 PM
arnyinc,
Yeah I left it off just because...I don't know why. When I set my variable I know I need quotes.
I tried myvar=replace(myvar, """", "") and it worked like a charm. I swear I tried this before and got an error! Oh well, Thanks for your help!
Tsbarnes
whammy
01-16-2003, 01:00 AM
Yay! :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.