While doing bulk renaming mistakenly I removed periods from extensions of many of my files and also it duplicated the extensions in every file
Now I would like to add them back
My Files look like this now
A Nightmare On Elm Street 720p Bluray X264-Pahe In mkv mkv
Austin Powers International Man Of Mystery 480p Bluray 300mb-Pahe In mkv mkv
Death_warrant_1990_720p_bluray_x264_750mb-Pahe In mkv mkv
Die Frau Des Polizisten 720p Bluray X264-Pahe In mkv mkv
So What I would like to do is remove the extra extension part, as well as add a period just before the extension so that it will look like a video file
That is..once I rename it should look like below
A Nightmare On Elm Street 720p Bluray X264-Pahe In.mkv
Austin Powers International Man Of Mystery 480p Bluray 300mb-Pahe In.mkv
Death_warrant_1990_720p_bluray_x264_750mb-Pahe In.mkv
Die Frau Des Polizisten 720p Bluray X264-Pahe In.mkv
Is there any regex that I could use? or can I use perl rename technique with regex to do so?