title: JavaScript Regular Expression OR Operator
body: <p>Saw a challenge on Twitter so I've been working my way through it, granted I am not the best with Regular Expressions. This is what I have so far:</p>
  
  <pre><code>var pass_regex = new RegExp(/^[a-z][A-Z][0-9]|[!@#$%^&amp;*()_]+$/);
  </code></pre>
  
  <p>I  am trying to match a password input that contains:</p>
  
  <ul>
  <li>1 Lowercase Letter</li>
  <li>1 Uppercase Letter</li>
  <li>1 Digit OR Special Character</li>
  </ul>
  
  <p>Where I am getting stuck is on the 'OR' part, I thought the pipe separator between [0-9] and my set of special characters would work but it doesn't seem to. Trying to better understand how you would use regular expressions to to check for 1 Digit OR 1 Special Character. Thank you in advance for any help provided.</p>