title: How is the AND/OR operator represented as in Regular Expressions?
body: <p>I'm currently programming a vocabulary algorithm that checks if a user has typed in the word correctly. I have the following situation:
  The correct solution for the word would be "part1, part2".
  The user should be able to enter either "part1" (answer 1), "part2" (answer 2) or "part1, part2" (answer 3). 
  I now try to match the string given by the user with the following, automatically created, regex expression:</p>
  
  <pre><code>^(part1|part2)$
  </code></pre>
  
  <p>This only returns answer 1 and 2 as correct while answer 3 would be wrong. I'm now wondering whether there's an operator similar to | that says <code>and/or</code> instead of <code>either...or</code>.</p>
  
  <p>May anyone help me solve this problem?</p>