I need a Perl match expression that will succeed if the passed string matches a particular format, excluding some combinations. For example I need a match expression for filenames that don't start with an underscore and aren't "index.html " so someone can't upload those files to my site. I tried:

^[^_](ndex\.html){0} .*

which it would seem to me excludes anything starting with an underscore and anything with...