title: Difference between ?:, ?! and ?=
body: <p>I searched for the meaning of these expressions but couldn't understand the exact difference between them.</p>
  <p>This is what they say:</p>
  <ul>
  <li><code>?:</code> Match expression but do not capture it.</li>
  <li><code>?=</code> Match a suffix but exclude it from capture.</li>
  <li><code>?!</code> Match if the suffix is absent.</li>
  </ul>
  <p>I tried using these in simple RegEx and got similar results for all.</p>
  <p>For example: the following 3 expressions give very similar results.</p>
  <ul>
  <li><code>[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+(?!\.[a-zA-Z0-9]+)*</code></li>
  <li><code>[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+(?=\.[a-zA-Z0-9]+)*</code></li>
  <li><code>[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9]+)*</code></li>
  </ul>