Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: Update PromQL basics.md with more examples on regex escaping#17635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
bwplotka wants to merge1 commit intomain
base:main
Choose a base branch
Loading
frombwplotka-patch-6

Conversation

@bwplotka
Copy link
Member

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

Does this PR introduce a user-facing change?

NONE


This can be useful for[`regex expressions`](#regular-expressions) on the regex-match selectors, for example:

{le=~"0\\.5"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

These examples illustrate using escaping in label matcher label value regexes, but this is the section about PromQL string literals. The "strings" in label matchers are not a string literal in the PromQL sense, but just a syntactic part of a vector selector node (not their own expression). So I would either move this to wherever label matchers are explained, or use a different example here where you have to escape something in a PromQL string literal - probably only in the case of thelabel_replace() function regex.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Makes sense, will move to matchers. Perhaps leave this too, but converted to label replace example, thanks!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@juliusvjuliusvjuliusv left review comments

@roidelapluieroidelapluieAwaiting requested review from roidelapluie

+1 more reviewer

@MichaHoffmannMichaHoffmannMichaHoffmann approved these changes

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@bwplotka@juliusv@MichaHoffmann

[8]ページ先頭

©2009-2025 Movatter.jp