I have it working and will submit it for the next release.
Examples using your suggested approach:
Code:
program: re_group(field('authors'), '(\S*), (\S*)', '[[$:uppercase()]] ', "[[$]]")
or
Code:
{authors:'re_group(field('authors'), '(\S*), (\S*)', '[[$:uppercase()]] ', "[[$]]")'}
Now I need to add another function like list_re that uses re_group instead of re. Something like
Code:
list_re_group(src_list, separator, search_re, group_1, group_2, ...)
that would apply the re_group to each item in the list.