title: Regex not start with dot or end with dot
body: <p>I need a regular expression that does not start with a dot or end with <code>[-_.]</code>.</p>
  
  <p>This regex works but fails for the first condition; it does not start with dot:</p>
  
  <pre><code>^[A-Za-z0-9][^.]*[^-_.][A-Za-z0-9]$
  </code></pre>
  
  <p>For example: <code>test.com</code> should be a valid string but it fails.</p>