Skip to content

Commit

Permalink
fix template example for regexReplaceAll function (#3576)
Browse files Browse the repository at this point in the history
Fixes an example for `regexReplaceAll` template function:
- use correct function name
- add missing $ sign when referencing a regex submatch
  • Loading branch information
sergeykranga authored Jun 9, 2021
1 parent 6f5e6b6 commit 22c4b07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sources/clients/promtail/stages/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ and trailing white space removed, as defined by Unicode.
```yaml
- template:
source: output
template: '{{ regexReplaceAllLiteral "(a*)bc" .Value "{1}a" }}'
template: '{{ regexReplaceAll "(a*)bc" .Value "${1}a" }}'
```

`regexReplaceAllLiteral` returns a copy of the input string, replacing matches of the Regexp with the replacement string replacement The replacement string is substituted directly, without using Expand.
Expand Down

0 comments on commit 22c4b07

Please sign in to comment.