Get rid of duplicates in lists

October 30, 2009 by Jean

Regex to remove dupliactes from a list. Not sure where it comes from, but it works:

function DeDupe(list,type)
{
     return reReplaceNoCase(ListSort(list,type),"([^,]+)(,1)*","1","ALL");
}

In: Regex ColdFusion