Replace tv show names

A swapping-ground for Regular Expression syntax

Replace tv show names

Postby doom1942 » Sun Aug 14, 2016 6:18 pm


I'd like to rename all the files in my Plex folder for TV show =s.
Here is what a few of the file names look like.
Breaking Bad S02E13 720p BluRay x264 AAC-SS -={SPARROW}=-.mp4
Dexter S02 E11 - BRRip - x264 - AC3 5.1 -={SPARROW}=-.mkv

I would like everything after the S??e?? removed. However, I would still like to keep the 720p if possible and i dont mind if the name of the episode is still there and i would still need the extension preserved.

Is there any expression that would allow me to do this?

Posts: 1
Joined: Sun Aug 14, 2016 6:06 pm

Re: Replace tv show names

Postby therube » Sun Aug 14, 2016 9:15 pm

Looks like this will mostly do it, but there could be a space left in there.
Also assumes; Season digit digit Episode digit digit.

Code: Select all
Match:  (.+)[Ss]\d\d\s*[Ee]\d\d
Replace:  \1
Posts: 396
Joined: Mon Jan 18, 2016 6:23 pm

Return to Regular Expressions