# Advanced Operators

These instructions apply to the legacy Admin Console.

## CLQL Advanced Operators

CLQL supports basic operators (`=`, `!=`, `<`, `<=`, `>`, `>=`, `<>`, `in`, `not`, `not in`).&#x20;

Below are some **advanced** operators:

### `matches`

Use a regex-like pattern on a string property.

```graphql
# Match 'aba', 'abb', 'abz', etc.
_message matches ab.

# Match 'ab' and 'abc'
_message matches abc?

# Match 'ab', 'abb', 'abbb', etc.
_message matches ab+

# Match 'a', 'ab', 'abb', 'abbb', etc.
_message matches ab*

# Match 'aa', 'aaa', and 'aaaa'
_message matches a{2,4}

# Match 'abc' or 'xyz'
_message matches abc|xyz

# Match 'abc' or 'abcdef' but not 'abcd'
_message matches abc(def)?

# Match 'a', 'b', 'c'
_message matches [abc]

# Match 'adc' and 'aec' but not 'abc'
_message matches a~bc

# Match 'abc' but nothing else
_message matches #|abc

# Match 'foo1', 'foo2', ..., 'foo100'
_message matches foo<1-100>

# Match 'aaabbbccc'
_message matches aaa.+&.+ccc

# Match everything not beginning with 'abc'
_message matches @&~(abc.+)
```

### `where`

Filter search results conditionally.

* Must start on a new line
* Must be preceded by `|`

```graphql
| where _instance matches http*
```

### `exists`

Check if a value exists for a specified field.

```graphql
| where _name exists
```

### `sort by`

Order search results by a specified field.

* Must start on a new line
* Must be preceded by `|`
* Default order is `desc` (descending)

```graphql
| sort by _createdAt asc
```

***
