Replace preg_match with in_array