View Single Post
Old 06-11-2015, 10:44 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,453
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by davidam2 View Post
I dont understand your code yet, but maybe I not explain correctly:
I need ONLY ONE AUTHOR AND ONLY HIS/HER SURNAME.
Chaley, your code make this? (I try to undestand it) THANKS!!

No, my code does not do that. Your example implied that you wanted the first author, and if there is more than one author then the last author as well.

If you want only the surname of the first author then we can probably use author_sort to get it easily. Something like the following in TPM
Code:
{author_sort:'re($, '^([^,]*).*', '\1')'} - {series:|| }{series_index:0>2s|[|] - }{title} ({pubdate:sublist(-1,0,\,)})
chaley is offline   Reply With Quote