I have a list of filenames like
index.min.html
index.dev.html
index.min.js
index.dev.js
There.are.also.files.with.multiple.dots.and.other.extension
I want to cut off the extensions of the filenames, but the problem is that I can only use match
for this task.
I tried many regular expressions looking like "index.min.html".match( /^((?!:(\.[^\.]+$)).+)/gi );
to select the filename without the last dot and extension, but they selected either the hole filename, nothing or the part before the first dot. Is there a way to select only the filename without extension?