a Little help with Filename: Find & Replace

Any questions? Need some help?
Post Reply
Zerelah
Posts: 23
Joined: 18 Feb 2014, 16:22

a Little help with Filename: Find & Replace

Post by Zerelah »

Hey I have been playing with renaming my subtitles using
http://www.filebot.net/forums/viewtopic ... &t=5#p2100

but it seems to be case sensative how would I get around that I tried adding both en|EN but that gives Englishlish
Propperly should have done a test mode first :lol:

can i get it to do both danish and english subs at the same time ?

and lastly how would I go about adding lang to subtitles that dont have it and are named as the video only I thought about a fileformat with {FN}.Lang
but if the sub has lang already it will just get another right ?

hope you can help once again

Zerelah
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: a Little help with Filename: Find & Replace

Post by rednoah »

1.
Did you know that (?i) makes the regex case insensitive?
http://www.regular-expressions.info/modifiers.html

2.
You can't do Danish and English at the same time. Keep it simple and make 2 calls.

3.
That's a bit tricky, but I'm sure you can make it work with negative lookbehind:
http://www.regular-expressions.info/lookaround.html
:idea: Please read the FAQ and How to Request Help.
Zerelah
Posts: 23
Joined: 18 Feb 2014, 16:22

Re: a Little help with Filename: Find & Replace

Post by Zerelah »

thanks Red and no I dident know that I will look in to this thank you
Zerelah
Posts: 23
Joined: 18 Feb 2014, 16:22

Re: a Little help with Filename: Find & Replace

Post by Zerelah »

Hey rednoah

I looked at the casesensative and it works but ran in to a snag if a subtitle is already maned correctly it gets an ish added

Code: Select all

filebot -script fn:replace  --filter "[.]srt$" --def "e=[.](?i)(dan|da)" "r=.Danish" "/Z:\[BluRay]\Almost Human\Season 1"
so eng or en gets renamed to English but if it is already named english it gets renamed to Englishish am I doing something horrebly wrong ?
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: a Little help with Filename: Find & Replace

Post by rednoah »

Positive Look-ahead for [.] ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply