title: Email patterns with primefaces
body: <p>I think my problem is simple enough, but I can't seem to overcome it.
  I'm using an input text for emails like this:</p>
  
  <pre><code>&lt;h:outputLabel value="Mail:" for="mail" /&gt;
                   &lt;p:inputText id="mail" value="#{UtilisateurBean.mail}"
                      title="Mail" validator="#{UtilisateursValidate.email}"
                      validatorMessage="ecrivez un mail valide"&gt;
                      &lt;f:validateRegex
                         pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" /&gt;
                      &lt;f:validateLength minimum="2" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>The problem is that it doesn't support the dot character before the @ like nouraty.n@mail.com (which is usually the case for gmail). I tried stuff like:</p>
  
  <p><code>pattern="[\w\.-]*[a-zA-Z0-9._%-]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]"</code></p>
  
  <p><code>pattern="[\w\.-]*[a-zA-Z0-9\._%-]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]"</code></p>
  
  <p>But no luck.
  Can anyone suggest a solution for this issue?</p>