title: php regex validation
body: <p>just a quick question am abit rubish with regex so thought I would post on here. The regex below is to validate a username.</p>
  
  <ul>
  <li><p>Must be between 4-26 characters long</p></li>
  <li><p>Start with atleast 2 letters</p></li>
  <li>Can only contain numbers and one
  underscore and one dot</li>
  </ul>
  
  <p>I have this so far, but isn't working</p>
  
  <pre><code>&lt;?php
  
  $username=$_POST['username'];
  
  if (!eregi("^([a-zA-Z][0-9_.]){4,26}$",$username))
  {
   return false;
  }
  else
  {
   echo "username ok";
  }
  
  ?&gt;
  </code></pre>
  
  <p>Thanks :)</p>