title: Regular expression to not allow spaces anywhere in the email
body: <p>I am trying to validate the email address using a regular expression such that it throws an error if white spaces are added anywhere in the email. The current regex I am using is this: </p>
  
  <pre><code>&lt;input type="email" class="form-control" name="username" ng-     model="username" id="email" placeholder="Email" ng-pattern='/^(([^&lt;&gt;()\    [\]\\.,;:\s@"]+(\.[^&lt;&gt;()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/' required /&gt;
  &lt;span ng-show="login.username.$error.pattern"&gt;This email format is invalid!     &lt;/span&gt;
  </code></pre>
  
  <p>The problem is it allows me to add white spaces in the end. How can I modify it so that if I add a whitespace in the end the error message is fired?</p>