Skip to content

replaceAllRegex expr repl text

replaceAllRegex returns text with all substrings matching the regular expression expr replaced with repl. It is an alternative to sprig's regexpReplaceAll function with a different argument order that supports pipelining.

Example

{{ "foo subject string" | replaceAllRegex "foo" "bar" }}