documentcloud/backbone — comment on commit 3098321989a47a2cd78d6aec8ea4840e4a408f50
File: backbone.js line 627
By davidmurdoch:

Are the capture groups necessary here? It should speed things up (trivially) by removing those; the `[\w\d]+` character class should work just fine by itself. AFAIK, these regexs are only used with String.replace - which doesn't make use of the captured groups.