You must choose one of single-function mode, template program mode, or general program mode. The syntax is different for each of the three.
For example, your template
Code:
{author_sort:'sublist(re($,\.,),0,1,&)'} or {author_sort:'re(sublist($,0,1,&),\.,)'}
is in template program mode where all string constants must be quoted. It should be written something like
Code:
{author_sort:'sublist(re($, '\.', ''),0,1,'&')'}
or
Code:
{author_sort:'re(sublist($,0,1,'&'), '\.', '')'}