Back to Chezmoi

`replaceAllRegex` *expr* *repl* *text*

assets/chezmoi.io/docs/reference/templates/functions/replaceAllRegex.md

2.70.2431 B
Original Source

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" }}
```