Use a simple regex for extracting pathname for require()