I am (re)posting this with help/advice from Rednoah, with some additional solution, for anyone interested:
I've looked into adding the Release groups to the (resulting) filenames but couldn't make it work.
It's really important to me to retain the information of origin (at-a-glance).
1. The {groups} binding is the best possible solution when it works, but one can still find many files where this is not the case.
2. For such instances regex text pattern matching in filename is a good enough solution.
This is what I have put together (using some of the naming schemes shared, the more complete expression shared by "Igor" does not work for me, I was not able to come up with a more robust one myself):
Code: Select all
{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])\w+$)|(?:^\w+(?=[-]))/)}; if(g==null && m!=null) return [m]; if(g!=null) return [g]}
Thanks again and kudos, Rednoah!