Skip to content

Commit

Permalink
Fixes regexReplaceAll docs (#3998)
Browse files Browse the repository at this point in the history
closes #3939
  • Loading branch information
owen-d authored Jul 19, 2021
1 parent d6dc43b commit 7289c06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sources/logql/template_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Signature:
`regexReplaceAll` returns a copy of the input string, replacing matches of the Regexp with the replacement string replacement. Inside string replacement, $ signs are interpreted as in Expand, so for instance $1 represents the text of the first sub-match. See the golang [Regexp.replaceAll documentation](https://golang.org/pkg/regexp/#Regexp.ReplaceAll) for more examples.

```template
`{{ regexReplaceAllLiteral "(a*)bc" .some_label "${1}a" }}`
`{{ regexReplaceAll "(a*)bc" .some_label "${1}a" }}`
```

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

0 comments on commit 7289c06

Please sign in to comment.