In Dopus 13.13 beta 1 the following code was working
// n gets item name without extension
n = is_dir ? value : Stem(value);
// remove 5+ consecutive digits
n = RegEx(n, "(.*?)[0-9]{5,}(.*)", "\1\2");
// return the 4 digits corresponding to the year
return RegEx(n, "([0-9]{4})", "\1");
but on Dopus 13.13 beta 7 and also beta 8 it is not working anymore.
Before, this code would group files by YEAR using their filename, but now each file goes to an individual group.