title: gorilla mux excluding request by extension
body: <p>An attempt to configure go server routing with <code>github.com/gorilla/mux</code> to respond to all requests with index.html but exclude requests with extension .jpg|.js|.png</p>
  
  <p>Static files excluded due to extension will be routed to FileServer. configured. </p>
  
  <p><strong>Failed Attempt</strong></p>
  
  <pre><code>  func main() {
          r := mux.NewRouter()
  
          r.HandleFunc("/{path:^.*([!js|jpg|png|gif])$}", func(w http.ResponseWriter, r *http.Request) {
              http.ServeFile(w, r, "dist/index.html")
          })
  
          r.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("dist"))))
  
          http.Handle("/", r)
          http.ListenAndServe(":8000", nil)
      }
  </code></pre>