i need help with preg_match
i have
if (!preg_match('/^[a-zA-Z0-9-_]/', $filename) )
{ print $error=...
}else{
upload...
How to improve the preg_match so i can use only a-zA-Z0-9 and this special characters "-_" nothing more. because as i did it when i have file with name abc def.pdf for example and i upload it and i shoudn't. It should be upload if it's abc_def.pdf or abc-def.pdf, because after i upload it i want to use the name as link and the whitespace not work. I think white space in browsers is $20
thnaks in advance