If you have an array, combining the last element with an ArrayToList is the easiest way (according to Henry's answer ).
If you got it as a string, using reereplace is a valid method and will work as follows:
<cfset Names = rereplace( Names , ',(?=[^,]+$)' , ' or ' ) />
Which says it matches a comma, and then checks (without matching) that there are no more commas until the end of the line (which, of course, will only apply to the last comma, and therefore it will be replaced).
source share