From e6b84ac1e09b1b7774686c6679babf34cf075f84 Mon Sep 17 00:00:00 2001 From: Guillaume Berche Date: Thu, 13 Oct 2022 10:40:52 +0200 Subject: [PATCH] functions.md doc refinement Removed named capture group example in label_replace Signed-off-by: Guillaume Berche --- docs/querying/functions.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/querying/functions.md b/docs/querying/functions.md index 79502a19ce..3658c10c6b 100644 --- a/docs/querying/functions.md +++ b/docs/querying/functions.md @@ -294,11 +294,10 @@ matches, the value of the label `dst_label` in the returned timeseries will be t of `replacement`, together with the original labels in the input. Capturing groups in the regular expression can be referenced with `$1`, `$2`, etc. Named capturing groups in the regular expression can be referenced with `$name` (where `name` is the capturing group name). If the regular expression doesn't match then the timeseries is returned unchanged. -These two examples will both return timeseries with the values `a:c` at label `service` and `a` at label `foo`: +This example will return timeseries with the values `a:c` at label `service` and `a` at label `foo`: ``` label_replace(up{job="api-server",service="a:c"}, "foo", "$1", "service", "(.*):.*") -label_replace(up{job="api-server",service="a:c"}, "foo", "$name", "service", "(?P.*):(?P.*)") ``` ## `ln()`