title: Validate email one-liner in Scala
body: <p>Adding simple e-mail validation to my code, I created the following function:</p>
  
  <pre><code>def isValid(email: String): Boolean = if("""(?=[^\s]+)(?=(\w+)@([\w\.]+))""".r.findFirstIn(email) == None)false else true
  </code></pre>
  
  <p>This will pass emails like <code>bob@testmymail.com</code> and fail mails like <code>bobtestmymail.com</code>, but mails with space characters slip through, like <code>bob @testmymail</code> will also return true.</p>
  
  <p>I'm probably being silly here...</p>