#1 2014-12-21 22:45

logan05
Member
Registered: 2014-12-18
Posts: 3

Replace all dots except beside S##E## episode patterns

I need help to create a rule that removes all " . " from file name except for those before and after a set of letters.  Sorry I'm sure there was a more eloquent way of saying that but...  I have a list of TV shows and I want to remove all the " . ",  but not the one before and after the episode Information, i.e. S##E##. 

For example...

The.Show.Name.S04E29.The.Episode.Name

Should look like this...

The Show Title.S01E01.The Episode Name

This is for a large list of shows, no two titles or episodes are the same. 

Thanks for the help.

Offline

#2 2014-12-22 20:53

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: Replace all dots except beside S##E## episode patterns

You can replace all dots with spaces first, and then find all S##E## patterns and surround them with dots again.

1) Replace: Replace all "." with " " (skip extension)
2) RegEx: Replace expression "\s(S\d\dE\d\d)\s" with ".$1." (skip extension)

Input:
> The.Show.Name.S04E29.The.Episode.Name.avi
Output:
> The Show Name.S04E29.The Episode Name.avi

Offline

#3 2014-12-24 22:05

logan05
Member
Registered: 2014-12-18
Posts: 3

Re: Replace all dots except beside S##E## episode patterns

Wow I do not know why I didn't see that.   Thank you

Offline

#4 2014-12-24 22:07

logan05
Member
Registered: 2014-12-18
Posts: 3

Re: Replace all dots except beside S##E## episode patterns

By the way thank you for such a fantasticlly useful application!!!

Offline

Board footer

Powered by FluxBB