[GEOT-4781] Add stringTemplate function to transform strings based on regular expression matches