That's correct. If there is no 'docx' to replace, it just moves on to .txt, then .pdf. No errors. Might not be the most elegant line of code ever, but gets the job done. Alternatively, I guess you could use listEach(): <cfset theString = replace( URL, "/", "" )>
<cfset alist = ".doc,.docx,.txt,.pdf">
<cfset listEach(alist,function(idx){
theString = replace(theString,idx,'');
})>
... View more