Skip to content

[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

Merged
merged 1 commit into from
May 5, 2020
Merged

[DOCS] EQL: Document match function #56134

merged 1 commit into from
May 5, 2020

Conversation

jrodewig
Copy link
Contributor

@jrodewig jrodewig commented May 4, 2020

Relates to #55182 and #55178

@jrodewig jrodewig added >docs General docs changes :Analytics/EQL EQL querying labels May 4, 2020
@jrodewig jrodewig requested a review from rw-access May 4, 2020 17:31
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@elasticmachine elasticmachine added the Team:Docs Meta label for docs team label May 4, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (:Query Languages/EQL)

@elasticmachine elasticmachine added the Team:QL (Deprecated) Meta label for query languages team label May 4, 2020
Copy link
Contributor

@rw-access rw-access left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@astefan astefan left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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",)

@jrodewig jrodewig merged commit 7156f40 into elastic:master May 5, 2020
@jrodewig jrodewig deleted the docs__eql-fn-match branch May 5, 2020 15:48
jrodewig added a commit that referenced this pull request May 5, 2020
@jrodewig
Copy link
Contributor Author

jrodewig commented May 5, 2020

Backport commits

master 7156f40
7.x cd3663e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/EQL EQL querying >docs General docs changes Team:Docs Meta label for docs team Team:QL (Deprecated) Meta label for query languages team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants