remove # from a string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CF FAN
    New Member
    • Mar 2008
    • 50

    remove # from a string

    Hi
    I have to remove # from a string in coldfusion ..but getting error .can u help me?
    plzzzzz

    <cfset narrative="nrr# tive">

    <cfoutput>#Repl ace(narrative, '##',' ', 'ALL')#</cfoutput>
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    The error's on the first line. You can't have one # in a string when you're setting it using cfset. Change it to "nrr##tive" .

    Comment

    • CF FAN
      New Member
      • Mar 2008
      • 50

      #3
      Actually i have to change a file name .the file name is "a#b.jpg" i have to change this file name "ab.jpg"..f or tht i have to remove that # ....

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Can you show the actual code? How is the filename set? Also what is the exact error message?

        Comment

        Working...