title: Why /^[a-zA-Z0-9]+@[a-zA-Z0-9]\.(com)|(edu)|(org)$/i does not work as expected
body: <p>I have this regex for email validation (assume only x@y.com, abc@defghi.org, something@anotherhting.edu are valid) </p>
  
  <pre><code>/^[a-zA-Z0-9]+@[a-zA-Z0-9]\.(com)|(edu)|(org)$/i
  </code></pre>
  
  <p>But <strong>@abc.edu</strong> and <strong>abc@xyz.eduorg</strong> are both valid as to the regex above. Can anyone explain why that is?</p>
  
  <p>My approach:</p>
  
  <ol>
  <li><p>there should be at least one character or number before @</p></li>
  <li><p>then there comes @</p></li>
  <li>there should be at least one character or number after @ and before .</li>
  <li>the string should end with either edu, com, or org.</li>
  </ol>