title: Regex string mismatch with pipe
body: <p>I have the following regex</p>
  
  <pre><code>var catalogueHrefRegex = /\/automobiles\/(cr)|(ts$)|(zs)|(ax)|(wx)$/;
  </code></pre>
  
  <p>I am testing this against a url, for example</p>
  
  <pre><code>var href = "xxx/compare/ax?model=xxx";
  </code></pre>
  
  <p>I run the following code</p>
  
  <pre><code>catalogueHrefRegex.test(href)
  </code></pre>
  
  <p>I expected it to return false but it returns true. I am trying to URLs like</p>
  
  <pre><code>/automobiles/cr/...
  /automobiles/ts/...
  /automobiles/zs/...
  /automobiles/ax/...
  /automobiles/wx/...
  </code></pre>
  
  <p>I have the $ at the end of ts because I don't want to match 'automobiles/tsx'
  I tried the following but none of them worked as expected</p>
  
  <pre><code>/\/automobiles\/((cr)|(ts$)|(zs)|(ax)|(wx))$/
  /\/automobiles\/*(cr)|(ts$)|(zs)|(ax)|(wx)*$/
  </code></pre>
  
  <p>I am not good with regex, so my attempts were after some googling. I am suspecting the way I set up the pipes were wrong or the grouping is incorrect because when I try 'cr', it works as expected but I am not sure how to group the cr/ts/zs/ax/wx so that it says match automobiles/ cr or ts or ...</p>
  
  <p><a href="http://jsfiddle.net/WdXXx/" rel="nofollow">http://jsfiddle.net/WdXXx/</a></p>
  
  <p>What is the correct regex for my desired results? Thank you for your time</p>