general program mode is far more flexible and allows multiple functions to be used in arbitrary ways. Unlike single-function mode, it does not assume you are operating on the base template (because there is none) and the field you wish to use must be explicitly stated as the first parameter.
Try:
Code:
program:
shorten(
re(
field('comments'),
'some-regex',
'replacement-text is empty'
),
50,
'...',
0
)
Whitespace is optional. I use it to lay out the template and what I am doing more clearly.