Replace tv show names

A swapping-ground for Regular Expression syntax

Replace tv show names

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

Hello,

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
Marvel.Agents.of.S.H.I.E.L.D.S03E17.The.Team.720p.WEB-DL.x264.AAC.mp4
30.rock.s03e08.flu.shot.720p.web-dl.x264-mrs.mkv
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?

Thanks
doom1942
 
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.

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


Return to Regular Expressions