title: Regular Expression validation fails in MVC
body: <p>I am using DataAnnotations in MVC for validation of PAN card number. If I Check my expression online on <a href="https://regex101.com/" rel="nofollow noreferrer">https://regex101.com/</a>, it execute correctly. But when I am trying it in my application, it gives error message as shown in below image.</p>
  
  <p><a href="https://i.stack.imgur.com/wS6i8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wS6i8.png" alt="enter image description here"></a></p>
  
  <p>I don't understand why this fails. Well I have used following code to implement this in model. So how can I implement it?</p>
  
  <pre><code>[DisplayName("PAN Number")]
  [Required(ErrorMessage = "* Please Enter PAN No.")]
  [RegularExpression(@"/[A-Z]{5}\d{4}[A-Z]{1}/", ErrorMessage = "* Invalid PAN Number")]
  public string US_PAN { get; set; }
  </code></pre>