That's possible, but then we also get non-extensions, like mustache.extensions.js would match.
What about /\.mustache(?:\.|\Z)/ or something like that, i.e. either followed by period or end of string.