title: Using PHP regex to validate username
body: <p>I am trying to validate a username in PHP using regex and everything I submit fails the check. I'm super new at this still.</p>
  
  <p><code>if ( !preg_match('/^[A-Za-z]{1}[A-Za-z0-9]{5-31}$/', $joinUser) )</code></p>
  
  <p>Rules:</p>
  
  <ul>
  <li>Must start with letter</li>
  <li>6-32 characters</li>
  <li>Letters and numbers only</li>
  </ul>
  
  <p>I've been working with <a href="http://www.regular-expressions.info/javascriptexample.html" rel="noreferrer">this online tester</a> and <a href="http://regexpal.com/" rel="noreferrer">this one too</a>. I read <a href="https://stackoverflow.com/questions/1221985/how-to-validate-a-user-name-with-regex">this thread</a> and <a href="https://stackoverflow.com/questions/168956/yahoo-username-regex">this thread</a> but wasn't able to understand much as they seems to be a little bit more complicated than mine (lookaheads? and various special characters).</p>
  
  <p>After reading the first thread I linked to, it seems like I'm one of the people that doesn't quite understand how saying "letters" impacts what's thought of as acceptable, i.e. foreign characters, accented characters, etc. I'm really just looking at the English alphabet (is this ASCII?) and numbers 0-9.</p>
  
  <p>Thanks.</p>