title: Validate FQDN in C# using regex
body: <p>I wrote the following pattern in C# to validate a FQDN received from a user:</p>
  
  <pre><code>(`?=^.{1,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-]{1,63}\.?)+(?:[0-9a-zA-Z]{1,})$)
  </code></pre>
  
  <p>I want to allow the user to enter the following FQDN:</p>
  
  <pre><code>&lt;name&gt;.&lt;letter&gt;&lt;digit&gt;
  </code></pre>
  
  <p>such as "aa.a1". For "aa.a1" my regex detects the FQDN as invalid, and for "aa.1a" it detects it as valid. Does anyone know why?</p>