If you want a regular expression to match anything except a certain extension (such as .png) :

^((?!\.png$).)*$