Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old May 29th, 2008, 11:20 AM
Member
 
Join Date: Mar 2008
Location: INDIA
Age: 23
Posts: 50
Default 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>#Replace(narrative, '##',' ', 'ALL')#</cfoutput>
Reply
  #2  
Old May 29th, 2008, 12:07 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,958
Default

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".
Reply
  #3  
Old May 30th, 2008, 07:32 AM
Member
 
Join Date: Mar 2008
Location: INDIA
Age: 23
Posts: 50
Default

Actually i have to change a file name .the file name is "a#b.jpg" i have to change this file name "ab.jpg"..for tht i have to remove that # ....
Reply
  #4  
Old May 30th, 2008, 09:05 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,958
Default

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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 204,639 network members.
Post your question now . . .
It's fast and it's free

Popular Articles