title: Regex for string with dots and without special characters or space
body: <p>I need regex that allows at least 2  and at most 4 dots. The string can't start or end with a dot. Special characters like <code>_ , * # $</code> etc. aren't allowed.</p>
  
  <p>The string must be of the format <code>string.string.string</code> Optionally, it could have more than 3 items (where dot is the item delimiter).</p>
  
  <p>Strings like <code>.string1.</code>, <code>string1.string2</code>, <code>string1. string2.  string3</code> and <code>str#ing1.strin*g2.str$ing3</code> are not allowed.</p>
  
  <p>For a start I've tried: <code>^[a-zA-Z0-9]+$</code>, but I don't want to start with dot. I added   <code>^[^\.][a-zA-Z0-9]+$</code> and I want to have dot after the first string so I made this   [^.]+<code>([a-zA-Z0-9])([\.]{1})</code>.</p>
  
  <p>It accepts characters like # instead of a-zA-Z and numbers 0-9 so I get stuck. </p>