like
like(subject: string, pattern: const string, [escape: const string]?) -> bool
Returns true if subject matches pattern (case-sensitive).
Within pattern, escape can be included to denote that the character following it be interpreted literally.
The arguments pattern and escape must be string literals. The argument pattern may include wildcards _ (matches exactly one character) and % (matches zero or more characters). If included, escape may only be a single character. If using backslash as the escape character, it must be escaped in the escape clause (see example).
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
filter like(@.bundle_kind, "%kube%")
Pass through all bundle kinds that contain the string 'kube'.
filter like(@.bundle_kind, "k^%__", "^")
Pass through all bundle kinds that are 4 characters long and begin with 'k%'.
filter like(@.bundle_kind, "k\%__", "\")
Pass through all bundle kinds that are 4 characters long and begin with 'k%'.
Updated 8 days ago