title: Combine Regexp?
body: <p>After collecting user input for various conditions like</p>
  <ol>
  <li>Starts with : <code>/(^@)/</code></li>
  <li>Ends with : <code>/(@$)/</code></li>
  <li>Contains : <code>/@/</code></li>
  <li>Doesn't contains</li>
  </ol>
  <p>To make single regex if user enter multiple conditions,
  I combine them with <code>&quot;|&quot;</code> so if 1 and 2 given it become <code>/(^@)|(@$)/</code></p>
  <p>This method works so far but,</p>
  <p>I'm not able to determine correctly, What should be the regex for the 4th condition? And combining regex this way work?</p>
  <hr />
  <blockquote>
  <p>Update: @(user input) won't be same
  for two conditions and not all four
  conditions always present but they can
  be and in future I might need more
  conditions like &quot;is exactly&quot; and &quot;is
  exactly not&quot; etc. so, I'm more curious
  to know this approach will scale ?</p>
  <p>Also there may be issues of user input
  cleanup so regex escaped properly, but
  that is ignored right now.</p>
  </blockquote>