Forum Moderators: coopster
$yourvariable=strtolower($yourvariable); // remove caps
$yourvariable=preg_replace("/\s/", "", $yourvarible); // remove spaces
regex ^([%\w-]+\.(?:jpe?g¦JPE?G¦gif¦GIF¦png¦PNG))$
This will convert to lowercase, and replace spaces.
You could also just use eregi, which dictates no case - matches upper and lower - and then add \s - 'any space character' - to your current expression.
Hope this helps.
Justin