Regex anyone?
<cfscript>
//DeDupe courtesy of Raymond Camden
function DeDupe(list,type) {
return REReplaceNoCase(ListSort(list,type),"([^,]+)(,\1)*","\1","ALL");
}
</cfscript>I haven't tested this and I can't vouch for the performance but you have to admit that (if it works) it is a very cool bit of code...
B)
Jason Sheedy wrote:
Hi guys and gals, does anyone know an easy way to remove duplicates from a list?
With all the handy list functions built into cf I would have thought this one would be a must.
Jason Sheedy www.voice.com.au
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
-- Brett Payne-Rhodes Eaglehawk Computing t: +61 (0)8 9371-0471 f: +61 (0)8 9371-0470 m: +61 (0)414 371 047 e: [EMAIL PROTECTED] w: www.ehc.net.au
--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
