You need to add the parameter "All" as the scope in your Replace tag --
Replace(get_ing_img.sbclc_item, " ", "", "All") That tells it to replace all occurrences rather than just the first one. -- Josh ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Monday, October 02, 2006 9:38 AM Subject: replace function > I'm trying to replace any black spaces in a string with nothing, > essentially removing the black > space. However, when I come accros a string like, "light sour cream", my > code below only > returns lightsour cream. It does replace the second space. Shouldn't it? > > I'm using ... > > get_ing_img.sbclc_item is query result which contains a string > <cfset IMAGE_TO_USE = #Replace(get_ing_img.sbclc_item, " ", "")#> > > Replaces occurrences of substring1 in a string with substring2, in a > specified scope. The search is case-sensitive. > FORMAT:#Replace(FORM.myString, FORM.MySubstring1, FORM.mySubString2)# > > D > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255036 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

