title: Hard Regex problems: conditionals search if it passes two or all three conditionals
body: <p>so im having trouble writing regex in javascript.
  I want to practice using conditionals on regex.</p>
  <p>Problem i want to solve:</p>
  <ul>
  <li>combinations of (small/capital letters) + (numbers) + (special characters)</li>
  <li>if using two of the possible combinations, the length should be from 10-16 long</li>
  <li>if using three of the possible combinations, the length should be from 8-16 long</li>
  </ul>
  <p>Regex for combinations:</p>
  <pre class="lang-js prettyprint-override"><code>^(?=.{10,16}$)(?=.*?[a-z])(?=.*?[A-Z])(?=.*?[0-9])(?=.*?\W).*$
  </code></pre>