Docs: state that all regular expressions are RE2. (#3518)

We already mentioned that regular expressions are RE2 for
[relabeling][0], but left open what the regular expression syntax
anywhere else is.

In the querying examples and reference, make it explicit that _all_
regular expressions are RE2.

[0]: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
pull/3535/head
Matthias Rampke 8 years ago committed by Brian Brazil
parent 9146760aab
commit cae4538b3e
  1. 3
      docs/querying/basics.md
  2. 3
      docs/querying/examples.md

@ -116,6 +116,9 @@ The following expression selects all metrics that have a name starting with `job
{__name__=~"job:.*"}
All regular expressions in Prometheus use [RE2
syntax](https://github.com/google/re2/wiki/Syntax).
### Range Vector Selectors
Range vector literals work like instant vector literals, except that they

@ -31,6 +31,9 @@ Note that this does a substring match, not a full string match:
http_requests_total{job=~".*server"}
All regular expressions in Prometheus use [RE2
syntax](https://github.com/google/re2/wiki/Syntax).
To select all HTTP status codes except 4xx ones, you could run:
http_requests_total{status!~"4.."}

Loading…
Cancel
Save