user3816325
user3816325

Reputation: 549

Classic asp putting string in double quotes

remitclient2 = Replace(remitclient2 ,"class=" Chr(34) & ls & chr(34) ">", "^")

i want to replace class="ls"> with ^

In classic asp I tried escape sequence too and in above I used chr(34).

Microsoft VBScript compilation error '800a03ee' Expected ')' /US_Offer_2014/lasttry.asp, line 35 remitclient2 = Replace(remitclient2 ,"class=" Chr(34) & ls & chr(34) ">", "^")

Upvotes: 1

Views: 8968

Answers (3)

user1945782
user1945782

Reputation:

remitclient2 = Replace(remitclient2 ,"class=""ls"">", "^")

You can do this quickly and easily by doubling up your quotes in the string. If you need quotes at the start or end of the string just remember to include the outer quote also, like so:

"abc""def" - quote in the middle
"""abcdef" - quote at the beginning
"abcdef""" - quote at the end

Upvotes: 2

user3816325
user3816325

Reputation: 549

remitclient2 = Replace(remitclient2 ,"class=""ls"">", "^")

is answer i tried and got

Upvotes: 0

I think you're just missing a couple of &s:

 remitclient2 = Replace(remitclient2 ,"class=" & Chr(34) & ls & chr(34) & ">", "^")

Upvotes: 0

Related Questions