thanks for the reply, i actually just found a shortcut! i converted the string 
to an array which removed any empty array elements, and then converted back to 
a list and therefore deleted all the duplicate, and trailing commas

 

>I am sure there are some nice slick regular expressions to do this, but I
>just simply do this a very dumbed down way.
>
><cfset myVar = ReplaceNoCase(myVar , ",,,,,", ",", "ALL")>
><cfset myVar = ReplaceNoCase(myVar , ",,,,", ",", "ALL")>
><cfset myVar = ReplaceNoCase(myVar , ",,,", ",", "ALL")>
><cfset myVar = ReplaceNoCase(myVar , ",,", ",", "ALL")>
>
>You could also write a loop to run until FindNoCase(myVar, ",,") EQ FALSE,
>so you keep turning double commas, into single commas which will continue to
>reduce the commas, until there are no matches.
>
>Again, there is probably a RegEx way to do this, but I don't know RegEx off
>the top of my head.
>
>Regards,
>David McGraw
>Oyova Software, LLC
>http://www.oyova.com
>
>
>
>
>> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338750
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to