Renaming tv shows

A swapping-ground for Regular Expression syntax

Re: Renaming tv shows

Postby KenP » Sat Dec 24, 2016 11:40 pm

The problem is that if you swap the 2 for a 3 as in your last post, it won't work on editions with 2 digits.

The Match criteria I showed in my last post e.g. (.*)\s((\d{3})|(\d{2})) will work if there's 2 digits or 3 digits.
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Re: Renaming tv shows

Postby DickyDck » Sat Dec 24, 2016 11:43 pm

Ok, I've hit a series that is backwards now....

Original
Episode# - Episodename.mkv ex: "001 - Surprised.mkv"

Desired Result
Showname - epsiode# - EpisodeName.mkv ex: "Bargaining-E001-Surprised"

Bargaining being the name of the series, and surprised being the name of the episode


Since there are no "seasons" perse, just one long ass running series. Taking the original posters regex and trying to hybrid with the one you gave me is producing some fun results :p but nothing pleasurable LOL
DickyDck
 
Posts: 10
Joined: Fri Dec 23, 2016 4:20 pm

Re: Renaming tv shows

Postby KenP » Mon Dec 26, 2016 9:49 am

DickyDck wrote:Original
Episode# - Episodename.mkv ex: "001 - Surprised.mkv"

Desired Result
Showname - epsiode# - EpisodeName.mkv ex: "Bargaining-E001-Surprised"

Bargaining being the name of the series, and surprised being the name of the episode

Sorry I couldn't get back to this earlier.

RegEx (1)
Match: (.*) - (.*)
Replace: Bargaining-\1-\2
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Re: Renaming tv shows

Postby DickyDck » Mon Dec 26, 2016 8:31 pm

Thanks! that seems so simpler but I was more trying to modify the existing ones you gave me and play with the results!
DickyDck
 
Posts: 10
Joined: Fri Dec 23, 2016 4:20 pm

Re: Renaming tv shows

Postby KenP » Mon Dec 26, 2016 8:41 pm

DickyDck wrote:Thanks! that seems so simpler but I was more trying to modify the existing ones you gave me and play with the results!

If for whatever reason you want to modify the others this is probably as close as you'll get.

RegEx (1)
Match: (\d{3}|\d{2}) - (.*)
Replace: Bargain-\1-\2
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Previous

Return to Regular Expressions