title: Regex problems with angularjs
body: <p>I am trying to use a regular expression to validate an email address. It does not seem to be doing any validation at all. When I load the page the Submit button is disabled because of the $pristine but as soon as I type a letter the button becomes enabled. Also I am aware that the regex is only accepting upper-case at the moment. The following code is my form:</p>
  
  <pre><code>&lt;form name="myForm" ng-hide="email" &gt;
  
  Insert Email :    &lt;br/&gt;
  
  &lt;input type="text" name="email" ng-pattern="/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]
  {2,4}$/" ng-model="insert_email"  required&gt; 
  
  &lt;br/&gt;  
  &lt;button ng-hide="email" 
  type="submit"  
  ng-disabled="myForm.email.$pristine || myForm.email.$invalid"&gt;Submit&lt;/button&gt;  
  
  &lt;/form&gt;
  </code></pre>
  
  <p>I am not sure but I think the problem may lie with the regex itself.</p>