title: Regex email validation Python to Javascript
body: <p>I'm having trouble fully understanding this Python 2 regular expression to validate email addresses. I found a great example <a href="https://stackoverflow.com/questions/8022530/python-check-for-valid-email-address">here</a>.</p>
  
  <pre><code>r"[^@]+@[^@]+\.[^@]+"
  </code></pre>
  
  <p>So according to <a href="https://regex101.com" rel="nofollow noreferrer">regex101</a> this means we need atleast 1 value before the '@' symbol, 1 '@' symbol, and any number of characters after the '@' symbol and atleast 1 '.' symbol. First of all correct me if I'm wrong, but secondly no documentation anywhere explains what "[^@]" means. So I'm having trouble understanding what the above code means.</p>
  
  <p>All I would like to do is convert the above code to Javascript but have only found help with the following case:</p>
  
  <pre><code>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
  </code></pre>
  
  <p>This means very little to me, but have found this useful example <a href="http://www.w3resource.com/javascript/form/email-validation.php" rel="nofollow noreferrer">here</a>. The problem is that the JavaScript expression over checks.</p>
  
  <p>For example, the following string passes in Python but fails the JS expression:</p>
  
  <pre><code>hi@gmail.com.edu/org
  </code></pre>
  
  <p>It really comes down to 1 question. <strong>How can I correct the JavaScript regex to match that of the Python regex?</strong></p>