title: Modify regular expression to not check length
body: <pre><code>@"^([a-zA-Z0-9_\-\.\']+)@((\[[0-9]{1,3}" +
  
                @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
  
                @".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
  </code></pre>
  
  <p>The regular expression above is used on a C# .net site to validate email addresses. It restricts what comes after the domain to be characters A-Z and can be 2 to 4 letters long.</p>
  
  <p>microsoft.co.uk passes</p>
  
  <p>microsoft.com passes</p>
  
  <p>microsoft.co.fred passes</p>
  
  <p>microsoft.co.freda fails</p>
  
  <p>I need to change the expression so it allows any length strings to occur after the domain.</p>
  
  <p>But if I change the third line to:</p>
  
  <pre><code>@".)+))([a-zA-Z]|[0-9])(\]?)$";
  </code></pre>
  
  <p>I would have thought that would remove the length restriction. But it doesn't. It makes .com and .co.uk addresses fail.</p>
  
  <p>How can I change the expression to allow:</p>
  
  <p>Jim@somecompany.longwordhere</p>
  
  <p>or</p>
  
  <p>Jim@somecompany.longwordhere.longwordhere</p>
  
  <p>with no restriction on how long 'longwordhere' is and with it being able to be letters or numbers?</p>