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. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291463 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

