Actually I tried your expression out and received the following error message:
Warning: preg_match() [function.preg-match]: Unknown modifier '?' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php on line 9
Did I implement it incorrectly?
$regExp = '/^([[:alnum:]_][[:alnum:]_\-]*/?)*(\.php)?$/';
echo preg_match($regExp, $fileName);