Or, use the previously-mentioned regex to replace two or more
consecutive spaces with a hyphen.

M!ke 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 4:00 PM
To: CF-Talk
Subject: Re: Replace spaces with dashes

after turning all the spaces into dashes, you can do a while loop
looking for double dashes and turning them into single dashes...

-----Original Message----
-From: [EMAIL PROTECTED]
-Date: Oct 18, 2007 13:41
-To: "CF-Talk"<[email protected]>
-Subj: Re: Replace spaces with dashes
-
-Problem with trim is it gets rid of the spaces that should have been
turned -into dashes.
-
-On 10/18/07, morgan l <[EMAIL PROTECTED]> wrote:
->
-> Trim(String) will get rid of leading or trailing spaces. You may
need a
-> RegEx and use ReReplace() if you want to replace multiple
connsecutive
-> spaces with just a single dash though. RegEx is not my bag, so I
can't
-> help
-> with specifics.
->
->
-
---
-Aaron Rouse
-http://www.happyhacker.com/
-
-
-




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291476
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