Quote:
Originally Posted by chaley
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.
|
Well, I did say there was probably a better way to do it
I'm not sure if I had read the description of the list_re and list_re_group functions. If I did, they didn't sink in. But, with that example, it's obvious what they do.