Also, I think this will fail if the filename has a . in it. e.g. foo.bar.js  Maybe would be better: '.*/(.*)\\.js$'