Quote:
Originally Posted by davidfor
That seems to work here. There is probably a better way to do it, but, that's what comes to mind at the moment.
|
A template function is probably the best because it is the fastest. However, should you want to do it in the template language, this seems to work.
Code:
program: list_re_group(field('author_sort'), ' & ', '.', '(.*?)(,|$)(.*)', '{$:uppercase()}')
It first separates the list of authors, Then for each author it applies a regexp to find the value before the comma and uppercases that value. If there isn't a comma then the entire author is uppercased.