Replacing " with Anything

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Replacing " with Anything

    I have tried and tried to replace " in a string with no luck. Any suggestions
    would be most appreciated. The string is "D: "

    Tried:
    <cfset L2_displayvolume = #Trim(Replace('#L1_displayvolume#', "'Chr(34)'",
    "XXXX", "All"))#>
    and tried:
    <cfset L2_displayvolume = #Replace('#L1_displayvolume#', "'Chr(34)'", "XXXX",
    "All")#>
    and tried:
    <cfset L2_displayvolume = #Trim(Replace(L1_displayvolume, #Chr(34)#, "XXXX",
    "All"))#>
    and tried:
    <cfset L_displayvolume = Trim(Replace('#L_displayvolume#', '#Chr(34)#',
    "XXXX", "All"))>
    and several others I lost count of.

    CoachChip Guest

  2. Similar Questions and Discussions

    1. "Replacing Font" Bar Never Stops-Can't Save Changed Doc.
      I'm replacing (2) letters ("n & d") in a PDF document. After I make the change and save the document, it keeps repeating the "Replacing Font" in the...
    2. Making "global" color changes to your designs; trouble replacing spot colors
      I have a simple design that I'm working on that involves 2 Pantone spot colors (518 and 445), plus the usual black/paper/registration, etc. I have...
    3. Replacing "tellTarget" with "With" help
      I am making a clip in which a random movieclip on the main timeline will play when you press a button. The actionscript works perfect when I use...
    4. Replacing hard drive on a 12" PowerBook G4?
      I got asked to find a procedure on how to replace a hard drive in a 12" PowerBook, but that doesn't seem to be something Apple's listing as a...
    5. replacing part of the path for "tar"
      Hi, I have to tar -xvf ebf100.30.tar, but when I do it it creates an ebf10030 directory inside the target directory and puts all the stuff...
  3. #2

    Default Re: Replacing " with Anything

    Here is something from an application I did a while back
    <cfset inputText = '"D"'>
    <cfoutput>inputText = #inputText# </cfoutput>
    <cfset outText = REReplaceNoCase(#inputText#,"([#chr(34)#]+)","?","ALL")>
    <cfoutput>outText = #outtext# </cfoutput>

    You can add other special characters into your your search string also e.g.
    <cfset outText =
    REReplaceNoCase(#inputText#,"([#chr(34)##chr(35)##chr(36)##chr(37)#]+)","?","ALL
    ")>

    Mike :)



    MikeDon Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139