title: How to validate a Twitter username using Regex
body: <p>I have used the pattern <code>/[a-z0-9_]+/i</code> within the function:</p>
  
  <pre><code>function validate_twitter($username) {
   if (eregi('/[a-z0-9_]+/i', $username)) {
    return true;
   }
  }
  </code></pre>
  
  <p>With this, I test if the input is a valid twitter username, but i'm having difficulties as it  is not giving me a valid result.</p>
  
  <p>Can someone help me find a solution.</p>