On 2/13/10, Matthew Smith wrote:
>
> I am generating static html for item pages.  I am trying to remove
> everything but the words and replace the spaces with "-".
>
> The inner replace works properly, the outer one is removing the hyphens.

So do it the other way around: first replace everything but
alphabetical characters and spaces by an empty string, then replace
all spaces by hyphens. Last, replace multiple hyphens with a single
hyphen.

Jochem

-- 
Jochem van Dieten
http://jochem.vandieten.net/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330697
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to