This is a simple personal opinion:
It is sometimes preferable to have several macro which allow to make a very precise action (but not necessarily unique) that to have the macro only one who can make a multitude of things, with a not unimportant number of parameters which most of the time are not useful. What has for consequence often to lengthen the template.
As in the example below:
{.substring|begin|end|it is the begin before the end of text.} -->> ' before the '
{.substring||end|it is the begin before the end of text.} -->> 'it is the begin before the '
{.chop begin|end|it is the begin before the end of text.}
{.substring|begin||it is the begin before the end of text.} -->> ' before the end of text'
{.chop end|begin|it is the begin before the end of text.}
More of macro but fewer parameters every time.
Otherwise, rejetto, I propose you a compromise:
A section [macro] or we could define our personal macro without crossing every time by the macro SET and not use the ^ at every time
[macros]
chop begin=substring||$1|$2
chop end=substring|$1||$2
[my section]
{.if|{.chop begin|end|it is the begin before the end of text.}|{:one action:}|{:other action:}/if.}
The example is not of the most simplistic, but it is to give an idea of the possibilities.
I am going to try to find of the delphi code to go to this direction