title: Ruby: Remove "double dot" with regex
body: <p>I'm using the following regex to validate emails in an email DB of a Rails App:</p>
  
  <pre><code>/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
  </code></pre>
  
  <p>it kinda works, but it leaves me with invalid mails wich have this kind of errors:</p>
  
  <pre><code>name@domain..com
  </code></pre>
  
  <p>How can I rwrite this regex to avoid that or wich is the best regex to clean up an email list I have to leave only valid email addresses? I'm using a method like this one to clean up the list:</p>
  
  <pre><code>def mailSweep
    mails = Email.all.lazy
    for address in mails do
      if address.email.to_s =~ /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
        puts address.email.to_s + " " + "it's valid"
      else
        puts address.email.to_s + " " + "it's invalid, destroying..."
        address.destroy
      end
    end
  end
  </code></pre>