var t = "orig" var step_reg = new RegExp(t) var list = ["orig", "net"] list = list.filter(function(v){return step_reg.test(v)}) console.log(list);