If you're inside a quoted string, you have to escape quotes by doubling them
(just like hashes inside CFOUTPUT).

<cfset newsym=replace(#qStockItems.Symbol#,"""","","ALL")>
                          note the doubling ^^

You can also use the other kind of quote (double/single) to wrap your string
to avoid the problem:

<cfset newsym=replace(#qStockItems.Symbol#,'"',"","ALL")>
                    note the single quotes ^ ^

Cheers,
barneyb

> -----Original Message-----
> From: Eric Creese [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 29, 2004 10:32 AM
> To: CF-Talk
> Subject: Replacing Characters
>
> I need to strip "(double quote) out of a string of
> characters. I tried the following but it bombed. Can anyone
> steer me in the right direction?
>
> <cfset newsym=replace(#qStockItems.Symbol#,""","","ALL")>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to