|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Going Crazy! Replace( ) on double quotes???
I want to remove all the double quotes from a string which changes in length. I 've tried several different ways to remove the double quotes but nothing will work.
Here are some of the different ways I've tried <CFSET keywords = ReplaceNoCase(keywords,Chr(22),"","ALL")> <CFSET keywords = ReplaceNoCase(keywords,Chr(34),"","ALL")> <CFSET keywords = ReplaceNoCase(keywords,"""","","ALL")> <CFSET keywords = ReplaceNoCase(keywords,'"','','ALL')> I've also tired turning the string into HTML edit format and try removing the &aspr; crap from the string that didnt' work either. I'm sure there is an easy solution, any ideas? Thanks in advance. |
|
#2
|
|||
|
|||
|
I don't see, why your 3rd line shouldn't work. So what error message do you receive, when you try it?
|
|
#3
|
|||
|
|||
|
I think you need 3 quotes for the replace:
<CFSET keywords = ReplaceNoCase(keywords,"""",""","ALL")> |
|
#4
|
|||
|
|||
|
You should be able to do this by using single quotes within the function...like this:
<CFSET keywords = ReplaceNoCase( keywords,'"','','ALL' ) /> So after keywords you have single quote ' then a double quote " and then another single quote to close it '.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Going Crazy! Replace( ) on double quotes??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|