Page 1 of 1

fn.match

Posted: 09 May 2014, 21:16
by Zerelah
Hi
I have this part in my script

Code: Select all

{' [' + file.path.matchAll(/extended|uncensored|remastered|unrated|uncut|Theatrical|Theatrical.Cut|Theatrical.edition|3d|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().unique().join(' - ').replaceAll(/[._ยด]/,"") + ']'}
but i just discovered if a movie is named with directors.cut i will get Directors Cut - Directors Cut
it is not a big deal but it would be nice to fix it
hope you can help yet again rednoah

Zerelah

Re: fn.match

Posted: 09 May 2014, 21:57
by rednoah
Directors Cut - Directors Cut is impossible, if the Strings really are equal, but maybe something close?

This works. Just need to make sure there's no ._- etc that would make the String not equal.

Code: Select all

{'directors.cut_Directors-Cut'.matchAll(/extended|uncensored|remastered|unrated|uncut|Theatrical|Theatrical.Cut|Theatrical.edition|3d|directors.cut|special.edition/)*.normalizePunctuation()*.upperInitial()*.lowerTrail().sort().unique().join(' - ')}

Re: fn.match

Posted: 11 May 2014, 20:31
by Zerelah
And again I forget to thank you
thanks for this I am not sure I understand but will play with it and learn
You do awesome work thank you