Add regexReplaceAll template function

- Add regexReplaceAll template function

regexReplaceAll replaces all occurrences of a regular expression with
the given replacement value. As in go, you can use variables like $1 to refer to subexpressions in the replacement string