Удалить "," с обеих сторон, только с правой стороны или только с левой стороны
<cfset theFunnyList = ",!@2ed32,a,b,c,d,%442,d,a">
Замените забавных персонажей и отделяйте их запятой
<cfset theList = rereplace(theFunnyList, "[^A-Za-z0-9]+", ",", "all")>
<cfset theList = trim(theList)>
<cfif left(theList, 1) is "," and right(theList, 1) is ",">
<cfset theList = right(theList, len(theList)-1)>
<cfset theList = left(theList, len(theList)-1)>
<cfelseif right(theList, 1) is ",">
<cfset theList = left(theList, len(theList)-1)>
<cfelseif left(theList, 1) is ",">
<cfset theList = right(theList, len(theList)-1)>
</cfif>
Сортировка списка (от нумерации до A-Z) ASCending
<cfoutput> #ListSort("#theList#", "text", "ASC", ",;")# </cfoutput>