I'm looking for a single regex expression that will match something that is 1 or more characters in length that does not match 500
. This is to be used in a Rails routes file, particularly to handle exceptions.
routes.rb
match '/500', to: 'errors#server_error'
match '/:anything', :to => "errors#not_found", :constraints => { :anything => /THE REGEX GOES HERE/ }
I'm a little lost on how to define regex that matches something and simultaneously does not match something else.