<body>
<cfset badwordslist = "uno,dos,tres,cuatro,cinco,seis,siete">
<cfset badWordsstatus = 0>
<cfoutput>
<cfloop index="FAList" from="1340" to="1343">
<cfoutput><hr>Beginning: #FALIST#<br></cfoutput>
<!---At this point FAList is just a number, nothing else--->
<cfset FAList = listAppend(FAList,[b]'uno cinco, diez'[/b])>
<!--get whatever the user provided and added to FAList: Results in a number, a comma and the entry from the user--->
<cfset FAList = replaceNocase(Falist," ",",","ALL")>
<!--- replace all spaces with a comma. Good but if you have multiple spaces you end up with ",,,,,,,, "empty elements that will get processed.--->
<cfoutput>Middle: #FALIST#<br></cfoutput>
<cfset FAList = reReplaceNoCase(Falist,",{2,}",",","ALL")>
<!---since something like "uno , dos" will get transformed into "uno,,,dos" then we need to replace every place where there are more than two commas with only one. We use Regexp for that.--->
<!---Now we have a nice clean list separated by commas and with no empty elements--->
<!---We need to loop through the list and compare each element to the BadWordsList, if we find one then increase the counter--->
<cfloop list="#FAList#" index="usrToken">
<cfif listFindNoCase(badWordsList,usrToken) eq 0>
<cfset badWordsstatus = badWordsstatus + 1>
</cfif>
</cfloop>
<cfset FAList = "">
</cfloop>
</cfoutput>
</body>