title: Regular expression not to allow whitespace at the end of email
body: <p>I am trying to accept an email without having whitespace or blank at the end.
  I have tried two variants</p>
  
  <blockquote>
    <p>pattern="^[A-Za-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{1,4}[^\s]+$"></p>
    
    <p>pattern="^[A-Za-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{1,4}\S$"></p>
  </blockquote>
  
  <p>both are not working &amp; input is accepting whitespace at the end. My full input line is </p>
  
  <blockquote>
    <p>input type="email" id="guestUserEmail" name="guestEmail" data-pattern-error="Email is invalid" data-required-error="Please enter email address" required pattern="^[A-Za-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{1,4}$"</p>
  </blockquote>
  
  <p>I referred this answer <a href="https://stackoverflow.com/questions/34974942/regex-for-no-whitespace-at-the-begining-and-at-the-end-but-allow-in-the-middle">regex for no whitespace at the begining and at the end but allow in the middle</a></p>
  
  <p>Please suggest!</p>