rearranging video file name into properly formatted episode.

A swapping-ground for Regular Expression syntax

rearranging video file name into properly formatted episode.

Postby bzzlghtyr » Sun Dec 12, 2021 7:00 pm

Currently all files are formatted as such:

Episode Name _ Show Name_ SEASON NAME _ Episode 1 (1080p_30fps).mp4

I want to properly match just the Episode Name and Episode's number (1 above, goes up to 3 digits) so I can use that info to format them all into

Show.Name.S02E01.Episode.Name.mp4


I can get the episode number with (\d+), and I can end up with the episode title if I use (.*?)\s\_\s. However I can't get both at once.
Every time I try to do more than 1 regex match check I end up with no matches, so I'm surely doing something wrong.
bzzlghtyr
 
Posts: 1
Joined: Sun Dec 12, 2021 6:43 pm

Re: rearranging video file name into properly formatted episode.

Postby Luuk » Mon Dec 13, 2021 8:02 am

The exampled now-name does not have enough elements to know that S02 should be the season number?
Luuk
 
Posts: 692
Joined: Fri Feb 21, 2020 10:58 pm


Return to Regular Expressions