fn.match

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

fn.match

Post 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
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: fn.match

Post 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(' - ')}
:idea: Please read the FAQ and How to Request Help.
Zerelah
Posts: 23
Joined: 18 Feb 2014, 16:22

Re: fn.match

Post 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
Post Reply