title: MVC 4 Regular Expression in View Model - Pagers or Mobile Numbers
body: <p>I am trying to get users to enter multiple 5 digit pager or 10 digit phone numbers separated by comma, space or semicolon using the regular expression below:</p>
  
  <pre><code>[RegularExpression("([0-9]{5|10}([ ,;]+)?)+", ErrorMessage = @"Please enter either 5 digit or 10 digit numbers separated by a space, comma or semicolon")]
  [DisplayName(@"Pager/Mobile Numbers (e.g 0402123499; 0302039855, 12345 67890; 20123) ")]
  public string MobileOrSmsNumbers { get; set; }
  </code></pre>
  
  <p>That does not work. Also, a user should not use two spaces or comma and semi-colon or space and comma, etc to separate the digits. There should be only one separating character.The last number does not need anything.</p>