title: php preg_match only numbers, letters and dot
body: <p>I have been searching for 2 hours now and I still don't get it. 
  I need to evaluate the input of the account name. That can ONLY contain numbers (<code>0-9</code>), letters (<code>a-z</code> and <code>A-Z</code>) and the dot (<code>.</code>).</p>
  
  <p>Everything else is forbidden. So, no underscore (<code>_</code>), plus (<code>+</code>) and so on. </p>
  
  <p>Valid accounts should look like, e.g.:</p>
  
  <pre><code>john.green
  luci.mayer89
  admin
  </code></pre>
  
  <p>I tried many preg_match/regex examples but I don't get it working. Whenever I do <code>echo preg_match(...)</code> I get <code>1</code> as <code>true</code>. </p>
  
  <pre><code>$accountname = "+_#luke123*";
  echo preg_match("/[a-z0-9.]/i", $accountname);
  
  //--&gt; gives back 1 as true
  </code></pre>
  
  <p>In addition, it would be great to control that the account name starts with at least 2 letters or numbers and ends with at least 1 letter or number - but I am far, far away from that.</p>