Page 1 of 1
Terminating bracket is lost in renaming process
Posted: 23 Dec 2017, 15:50
by beamer145
Hi,
I recently noticed that if a field (eg group) has xxxx[yyy] in the source name, the end result will be xxxx[yyy (so without the ending ])
Problable some interference with it being a regex symbol ?
Version 4.7.9
Re: Terminating bracket is lost in renaming process
Posted: 23 Dec 2017, 18:22
by kim
What is your format ?
using {group} should only result in "xxxx" OR "yyy"
Re: Terminating bracket is lost in renaming process
Posted: 24 Dec 2017, 13:53
by beamer145
My complete format string is
{n}.{s00e00}.{t}.{vc}.{ac}{".$group"}{".$lang"}{fn.match(/[.]HI(?\=\\.)/)}{fn.match(/[.]HI$/)}
(can't say i remember why i prefixed with .$ , it's 4 years ago that i made this and i do not know the syntax anymore)
An generic example that has the problem would look like
aaaaaaaaaaaa.SbbEcc.HDTV.x264-XXX[yyyy].mkv
Re: Terminating bracket is lost in renaming process
Posted: 25 Dec 2017, 04:58
by kim
I can't reproduce the problem
Re: Terminating bracket is lost in renaming process
Posted: 25 Dec 2017, 10:38
by rednoah
There's a good chance that this particular issue has been fixed with one of the more recent updates.
Re: Terminating bracket is lost in renaming process
Posted: 25 Dec 2017, 23:05
by kim
xxxx[yyy] it wrong anyway so:
GROUP[NOT GROUP but site Who Shared It]
then you can do something like:
or if you REALLY want the ]
Code: Select all
{group.match(/\[/) ? group+']' : group}
Code: Select all
{group.match(/\[/) && !group.contains(/\]/) ? group+']' : group}
Re: Terminating bracket is lost in renaming process
Posted: 26 Dec 2017, 12:18
by beamer145
Great, thanks for the tips !
I am indeed not really interested in the [ ] part, so i decided to go for
Code: Select all
{n}.{s00e00}.{t}.{vc}.{ac}{".${group.replaceAll(/\[.+\]?/,'')}"}{".$lang"}{fn.match(/[.]HI(?\=\\.)/)}{fn.match(/[.]HI$/)}