Page 1 of 1

I need to replace spaces with dashes in TV episodes

PostPosted: Sun Aug 22, 2021 9:36 pm
by Ronstang
Currently my DVR records my TS files with names like:

Santiago of the Seas S01E31 Triton's Trumpet

But once I compress them and organize them into their folders all of my TV shows are currently named as such:

Santiago of the Seas-S01E31-Triton's Trumpet

So I need to simply replace the spaces with dashes.

Any help would be greatly appreciated. I am slowly starting to understand some of the things needed to use this awesome program but that is still limited to mostly modifying settings someone has already shown me to use....then experimenting.

Re: Replace all spaces inside TV 'episode'

PostPosted: Mon Aug 23, 2021 3:46 am
by Luuk
To replace all spaces, use Replace(3) with a space inside of 'Replace' and - inside of 'With'.

To replace all spaces before S##E##, use RegEx(1) with a checkmark in "v2", so then a 'Match' and 'Replace' like...
\ (?=.+-S\d\dE\d\d-.+)/g
-
To replace all spaces after S##E##, just change the 'Match' to...
\ (?!.+S\d\dE\d\d-)/g

Re: I need to replace spaces with dashes in TV episodes

PostPosted: Mon Aug 23, 2021 4:32 am
by Ronstang
Thank you Luuk but I am really confused as to what goes in to the 'Match" field and what goes into the 'Replace' field here. I don't want all the spaces replaced, just the ones before and after the SXXEXX field but I am still confused as to what goes where.

Replace all spaces in names with -S##E##-

PostPosted: Mon Aug 23, 2021 7:19 am
by Luuk
I forget to say... Inside Filters(12) to put a 'Mask' like -S\d\dE\d\d- then put a checkmark in RegEx to conduct this filter!
Then to replace all of your spaces, you can just use the Replace(3) settings above.

Re: I need to replace spaces with dashes in TV episodes

PostPosted: Sun Aug 29, 2021 7:32 pm
by Ronstang
I'm very confused. I don't want to replace ALL the spaces. I just want to replace the spaces before and after S##E## with dashes so:

What on Earth S01E03 Secrets of Sahara.ts

Becomess

What on Earth-S01E03-Secrets of Sahara.ts

Re: I need to replace spaces with dashes in TV episodes

PostPosted: Mon Aug 30, 2021 6:03 am
by Luuk
Sorry, I thought from the first post, that after compressing, they were already named like "Santiago of the Seas-S01E31-Triton's Trumpet".
And then you need to replace some of the spaces, so thats what all of the confusion comes from guessing about which spaces to replace?

To simply replace " S##E## " with "-S##E##-" the 'Match' and 'Replace' is like...
(.+) (S\d\dE\d\d) (.+)
\1-\2-\3

To only conduct .ts files, you can type a Filters(12) 'Mask' like *.ts and then click the blue-arrows beside 'Mask'.

Re: I need to replace spaces with dashes in TV episodes

PostPosted: Sat Sep 04, 2021 7:05 am
by Ronstang
Thank you so much, works brilliantly. I love this program and need it a lot now that I have moved to manually controlling my content. Unfortunately I don't understand scripting syntax so much of this is foreign to me.

Re: I need to replace spaces with dashes in TV episodes

PostPosted: Thu Oct 14, 2021 6:44 am
by dec
... is using RegEx? which i have no understanding of at all. where is QRG?

does normal Replace accept wild cards in char strings?
ie 'd*s* '