Jak wyodrębnić struny w macierzy JS

function search (array,string) {

    var arr= [];

    for (var i=0; i<array.length; i++) {
        if (array[i].match(string)){

          arr.push(i)

          return arr;
        }  
    }
      return -1;
  }

 search(array,'v_')
Gifted Goose