promql: Update basics.md with more examples on regex escaping

As discussed in https://cloud-native.slack.com/archives/C01AUBA4PFE/p1764678392087529

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
This commit is contained in:
Bartlomiej Plotka 2025-12-02 12:53:50 +00:00 committed by GitHub
parent 0e682a70a6
commit b37389ea9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -106,6 +106,11 @@ Example:
'these are unescaped: \n \\ \t'
`these are not unescaped: \n ' " \t`
This can be useful for [`regex expressions`](#regular-expressions) on the regex-match selectors, for example:
{le=~"0\\.5"}
{le=~`0\.5`}
### Float literals and time durations
Scalar float values can be written as literal integer or floating-point numbers