Sorry if this question is too basic, I've been searching python and regex and haven't found exactly what I need.
I have a bunch of television show files with names that end in S01EXX like the following:
filename.S01E01.mkv
filename.S01E02.mkv
filename.S01E03.mkv
Each of this is actually a double episode, so the above three should be named with the form:
filename.S01E01-E02.mkv
filename.S01E03-E04.mkv
filename.S01E05-E06.mkv
so each should be the episode number times 2 minus 1, and the episode number times 2. I know how to rename and split with python, I just don't know how to go about parsing out the episode numbers and how deal with the leading zero that will disappear when we get to 2 digit episode numbers.
Any help is much appreciated!