title: Regex X and/or Y
body: <p>Consider the following regular expression, where <code>X</code> and <code>Y</code> are <em>any</em> regex.</p>
  
  <pre><code>XY|YX|X|Y
  </code></pre>
  
  <p>This regex tests for <code>X</code> and/or <code>Y</code>, but has to double-check expressions if the "and" clause is not found.</p>
  
  <p>What is the best way to match <code>X</code> <strong>and/or</strong> <code>Y</code>?</p>