title: Exclusive Or in Regular Expression
body: <p>Looking for a bit of regex help.
  I'd like to design an expression that matches a string with "<em>foo</em>" OR "<em>bar</em>", but not both "<em>foo</em>" AND "<em>bar</em>"</p>
  
  <p>If I do something like...</p>
  
  <pre><code>/((foo)|(bar))/
  </code></pre>
  
  <p>It'll match "<em>foobar</em>". Not what I'm looking for. So, how can I make regex match only when one term or the other is present?</p>
  
  <p>Thanks!</p>