My suggestion would be to avoid putting so much overhead in the regular expression engine for such a simple test. You can accomplish what you want in PHP by doing something like:
[PHP]
# Assuming you are testing $string...
if(preg_match('/^[0-9a-z]{5,9}$/',$string) || strlen($string) < 1) {
# Do things here.
}
[/PHP]
How about that?