-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[DOCS] EQL: Document match
function
#56134
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pinging @elastic/es-docs (>docs) |
Pinging @elastic/es-ql (:Query Languages/EQL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left one question, up to you if it needs clarification in docs or not. Thanks.
[[eql-fn-match]] | ||
=== `match` | ||
|
||
Returns `true` if a source string matches one or more provided regular |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know which regular expression is checked first? I mean, does it matter if it's matching the second or the fourth regular expression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it matters from a usage point of view.
The expressions are checked using OR
logic so if any of the regular expressions match, the function returns true
.
The function also doesn't give any indicator of which expression matched. Only that at least one did.
match("explorer.exe", "[a-z]*?.exe", "[1-9]")
is equivalent to
match("explorer.exe", "[1-9]", "[a-z]*?.exe",)
Relates to #55182 and #55178