The notes js regex apply here also:
* the extension regex should be a variable
* handling namespaced files