PHP Expression Woes
<p>I'm trying to do regular expression in PHP but I keep getting bugged. I want it so it's A-Z, 0-9, and the underscore (_) but the underscore cannot be used on the edges of a text. Only on the inside.</p>

<p>Here is waht I have:</p>

<pre><code>if (!ereg("^[a-zA-Z0-9_]{3,16}$",$username)) {
// Does not match
}else{
// Good job, within rules!
}
</code></pre>
