title: nginx server_name regex
body: <p>server_name in nginx does not match</p>
  
  <p>I want to match with such FQDNs
  I came up with</p>
  
  <pre><code>server_name "~^(www.)?ucwebapi-uccore(\d{0,3})-(\d{0,3})\.testme\.net";
  </code></pre>
  
  <p>To Match</p>
  
  <pre><code>ucwebapi.testme.net
  ucwebapi-uccore.testme.net
  ucwebapi-uccore1-0.testme.net
  ucwebapi-uccore999-999.testme.net
  </code></pre>
  
  <p>Validated with <a href="https://regex101.com/r/tAwEp9/2" rel="noreferrer">https://regex101.com/r/tAwEp9/2</a></p>
  
  <p>Tested with </p>
  
  <pre><code>server_name "~^(www.)?ucwebapi-uccore(\d{0,3})-(\d{0,3})\.testme\.net ucwebapi1.testme.net";
  </code></pre>
  
  <p>to see if ucwebapi1.testme.de server is reachable at all.</p>
  
  <p>Is there any restriction im not aware of?
  Thank you.</p>