Dave Perrett

Regex to Reject an Extension

programming, quickie

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

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