How can I perform a "like" or "contains" search on a string?
<p>Can I compare an especific value of an array in a if() conditional ?</p>

<p>Ex.:</p>

<pre><code>// teacher object
function Prof(id,tab,nome,ocupacao,email,tel,foto)
{
   this.id  = id;
   this.tab = tab;
   this.nome    = nome;
   this.ocupacao= ocupacao;
   this.email   = email;
   this.tel = tel;
   this.foto    = foto;
}

//teachers array
var arr = new Array();
arr[0]  = new Prof('pf1','dir','Mario','Diretor','mail@mail.com','tel','foto');
arr[1]  = new Prof('pf2','dir','Joao','t1 t3 t7','...','...','...');
...

// So now i will get the array value of "ocupacao" and see if this value has
// an specific value that i´ve defined in the conditional:
...
if(arr[i].ocupacao (has value) t7)
{
    //do something
}
</code></pre>

<p>NOTE; There is something that i can use like in PHP or ASP: "LIKE" or "%value%"?</p>
