title: How to find part of a string in array jQuery
body: <p>I've been trying to find a portion of a string in a couple of Array of strings without success:</p>
  
  <p>I have array1 <code>['BA11', 'BA14', 'BA15']</code></p>
  
  <p>and  array2 <code>['GL156', 'GL24', 'GL31']</code></p>
  
  <p>I wanted that it would return true when I searched for just part of the string "BA11AB", "BA15HB" or "GL156DC".</p>
  
  <p>Here is the code I've been using but without success:</p>
  
  <pre><code>if($.inArray(userinput, array1) !== -1) 
          {
              alert("Found in Array1!");
          }
  
  if($.inArray(userinput, array2) !== -1) 
          {
              alert("Found! in Array2");
          }
  </code></pre>
  
  <p>Thanks
  Nuno</p>