title: How can I write a regular expression that matchs case insensitive emails?
body: <p>I have following code to find user with an email.</p>
  
  <pre><code>User.findOne({
          email: { $regex: new RegExp('^' + req.body.email.toLowerCase() + '$','i') }
  })
  </code></pre>
  
  <p>It finds the user with a given email by lowercase letters and case insensitive search.</p>
  
  <p>The problem is, we have some emails like <strong><code>john+doe@johndoe.com</code></strong> and this regular expression doesn't match those emails.</p>
  
  <p>What should I add to regular expression to find that kind of emails?</p>