title: In javascript, how do you search an array for a substring match
body: <p>I need to search an array in javascript. The search would be for only part of the string to match as the string would have addtional numbers assigned to it. I would then need to return the successfully matched array element with the full string.</p>
  
  <p>i.e.</p>
  
  <pre><code>var windowArray = new Array ("item","thing","id-3-text","class");
  </code></pre>
  
  <p>I need to search for the array element with <code>"id-"</code> in it and i need to pull the rest of the text in the element as well (ie. <code>"id-3-text"</code>).</p>
  
  <p>Thanks</p>