Change regex to strip extension

Change the regex instead of using the raw filename, making sure the extension is stripped.