Page 1 of 1
Custom format for TV shows
Posted: 01 Aug 2017, 12:27
by DJ1
Hi just just got file bot need to know the reg expressions stuff...
Something pretty basic as far as I know...
I'm looking to have
Game.On.S01.E01 - Whatever.The.Title.Is.mp4
So basically replacing spaces with "." except after the E** and insertion of " - " after the E**
Cheers.
Re: TV shows
Posted: 01 Aug 2017, 13:28
by rednoah
Something simple like this should get you close:
Code: Select all
{n.space('.')}.{s00e00}.{t.space('.')}
Re: Custom format for TV shows
Posted: 07 Aug 2017, 18:40
by DJ1
hmmm ok I had a chance to play with it a bit....
so
Code: Select all
{n.space('.')}.{'s'+s.pad(2)}e{e.pad(2)} - {t.space('.')}
= Game.On.s01e05 - Matthew,.a.Suitable.Case.for.Treatment
and
Code: Select all
{n.space('.')}.{s00e00} - {t.space('.')}
= Game.On.S01E05 - Matthew,.a.Suitable.Case.for.Treatment
Do you know if theres a way of NOT inserting `.` if `,` exists??
i cant see it if there is a way...
cheers.
Re: Custom format for TV shows
Posted: 08 Aug 2017, 02:06
by rednoah
DJ1 wrote: ↑07 Aug 2017, 18:40
Do you know if there's a way of NOT inserting `.` if `,` exists??
For example?
e.g. here's one way to interpret this:
Code: Select all
n.contains(',') ? n : n.space('.')
@see
viewtopic.php?f=5&t=4191
Re: Custom format for TV shows
Posted: 08 Aug 2017, 08:26
by DJ1
Cheers I'll have a look...
Also the renaming I narrowed it down too (with works pretty well

) an example is what I posred above...
I just put the regex there also to be helpful of others
Cheers.