Fastest way to search string in javascript
<p>I have a hidden field on my page that stores space separated list of emails.
I can have maximum 500 emails in that field.</p>

<p>What will be the fastest way to search if a given email already exists in that list?
I need to search multiple emails in a loop</p>

<ol>
<li><p>use RegEx to find a match </p></li>
<li><p>use indexOf() </p></li>
<li>convert the list to a
javascript dictionary and then
search</li>
</ol>

<p>If this is an exact duplicate, please let me know the other question.
Thanks</p>

<p>EDIT:
Thanks everyone for your valuable comments and answers.
Basically my user has a list of emails(0-500) in db. 
User is presented with his own contact list.
User can then choose one\more emails from his contact list to add to the list.
I want to ensure at client side that he is not adding duplicate emails.
Whole operation is driven by ajax, so jsvascript is required.</p>
