# like¶

## Description¶

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).

bool

## Domain¶

This is a scalar function (calculates a single output value for a single input row.)

## Usage¶

like( subject, pattern [ , escape ] )


Argument

Type

Required

Multiple

subject

string

Required

Only one

pattern

string

Required

Only one

escape

string

Optional

Only one

## 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%’.