How to check that a string contains at least 5 unique characters and is minimum 7 characters long?
<p>I need a validation that tests for a string that contains 5 unique characters and is at least 7 characters long.</p>

<p>I have already tried it with the following regex:</p>

<pre><code>^[a-zA-Z][0-9]{7}$  
</code></pre>

<p>I'm stuck and have no idea how to do the validation so that the string contains at least 5 unique characters.</p>