Simple Registration Question

This code is part of a registration program. how can I make the eregi() not look for dashes in the $subuser variable? HELP!!! :o :o :o :o

/* Check if username is not alphanumeric /
else if(!eregi("^([0-9a-z])+$", $subuser)){
$form->setError($field, "
Username not alphanumeric");

Just add dash to the pattern (escaping it with backslash):
[php]eregi("^([0-9a-z-])+$", $subuser);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service