Its been a couple of years but I seem to recall once running into an issue
where replace would not replace everything in a similar fashion.  I think
the solution at the time was to run the replace function again, so something
like <cfset dirName = Replace(Replace(String," ", "-", "ALL")," ", "-",
"All")>  However maybe used a regex for it, but might be worth trying the
double functions if the string is not huge.

On 10/18/07, Steve Sequenzia <[EMAIL PROTECTED]> wrote:
>
> I need to take a string and replace all the spaces with dashes. I tried
> using the replace function but I am having issues with strings that have
> multiple spaces next to each other and/or a space or spaces at the end. Here
> is what I have:
>
> <cfset dirName = #Replace(String," ", "-", "ALL")#>
>
> Any suggestions on a better way to do this?
>
> Thanks in advance for any help.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291468
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to