The filename will always be after the final slash.
The extension will always be after the final period.
There will be no need for any
(.*) patterns at all; stuff like
(([^/]+/)*) will strip the folder structure.
When you have found the filename and extension,
(([^.]+\.)+)([^./]+) will split the filename and extension.