View Single Post
Old 10-19-2012, 02:39 AM   #4
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,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The template language is closer to lisp (with "prog") than python, but not all that close.

The following does what I think you want
Code:
program: 
	lang = test(field('language'), strcat(field('language'), '_'), '');
	list_re(field('tags'), ',', '(.*)', strcat(lang, '\1') )
It assumes that there is one language in languages or that you want all languages as the prefix, and that you want the language code instead of the language name.
chaley is offline   Reply With Quote