if(/^asd\((?:1|sda|643)\)$/.test($array[1])) { //.. }
var arr = [1, 'sda', 543]; if(arr.indexOf($array[1]) + 1) { //... }