arrInput = ['4','5','17']
':contains(4),:contains(5),:contains(17)'
alert( ["1", "2", "3"].join(",").replace(/(\d+)/g, ":contains($1)") )
var arrInput = ['4','5','17']; arrInput =''+arrInput.map(function(a) { return ':contains('+a+')' }) ; alert(arrInput)
['4','5','17'].map(v => `:contains(${v})`).join(',')