GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Help needed with regex finding and removing text

i have files everyday that need renamed.

The_News_Quiz_Extra_Series_27_-_08._Episode_8_m0009k92_original.mp3
The_News_Quiz_Extra_Series_27_-_09._Episode_9_m0009k93_iplayer.mp3

As you see above the file names aren't the same length.
I need a preset to get to this

The_News_Quiz_Extra_Series_27_-_08._Episode_8.mp3
The_News_Quiz_Extra_Series_27_-_09._Episode_9.mp3

Thank you. I am using Opus 12

Do you want to remove everything after the 2nd last _ character? It's hard to know for sure with only two examples and no description of what you want removed.

thanks for your reply.
the downloads are from the bbc and are almost always the same format.
The_News_Quiz_Extra_Series_27_-_08._Episode_8 is the episode name
_m0009k92_original and m0009k93_iplayer are what i want to remove from the end.
I used to just remove the last 18 characters but the bbc changed the format occasionally and it had less characters and i deleted part of the name.
the format is always
The_News_Quiz_Extra_Series_27
-_08._Episode_8_m0009k92_original.mp3
episode name _m0009k92 _original
what i was trying to do was find the second last _ and delete it and everything after it

Mode: Regular Expressions
Old name: (.*)(_.*_.*)$
New name: \1

Make sure Ignore extension is turned on.

thanks for quick reply - works great.
I was going to ask you to explain it but i see what you have done