Skip to main content
Karen_Little
Inspiring
July 21, 2006
Question

How do you Replace() using the double-quote character?

  • July 21, 2006
  • 1 reply
  • 4810 views
I want to get rid of Word's curly quotes. Quite frankly, I can use ColdFusion's standard replace(... by pasting in an unwanted character.

Example - I can paste in a curly quote and replace it with a tildi ~ without a problem.

But, I cannot replace it with a doubleQuote mark.

I've tried escaping it like """", as in replace("x", """" .... but am not successful.

Any ideas?
This topic has been closed for replies.

1 reply

Inspiring
July 21, 2006
Mix your quote types.

replace('x','"'...)



Karen_Little wrote:
> I want to get rid of Word's curly quotes. Quite frankly, I can use ColdFusion's
> standard replace(... by pasting in an unwanted character.
>
> Example - I can paste in a curly quote and replace it with a tildi ~ without a
> problem.
>
> But, I cannot replace it with a doubleQuote mark.
>
> I've tried escaping it like """", as in replace("x", """" .... but am not
> successful.
>
> Any ideas?
>
Karen_Little
Inspiring
July 22, 2006
Absolutely nothing I've tried works, including replace(variable, 'a', ':', 'all') (system won't accept the 'all') or replace(variable, "a", "'''"", "all")

I've even been trying scripts -- I cannot get a " to replace anything else. Generally, when I return the string, the majority of it just disappears, otherwise, I get an error message about the line with replace()
Participating Frequently
July 22, 2006
Did you try using the CHR() function? CHR(34) = "

replace(variable, "a", chr(34), "all")

Phil