> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# max_hyperscan_* session settings

> ClickHouse session settings in the max_hyperscan_* generated group.

These settings are available in [system.settings](https://clickhouse.com/docs/reference/system-tables/settings.md) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## max\_hyperscan\_regexp\_length

Type

UInt64

Default

0

Defines the maximum length for each regular expression in the [hyperscan multi-match functions](https://clickhouse.com/docs/reference/functions/regular-functions/string-search-functions.md#multiMatchAny).

Possible values:

* Positive integer.
* 0 - The length is not limited.

**Example**

Query:

```sql theme={null}
SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 3;
```

Result:

```text theme={null}
┌─multiMatchAny('abcd', ['ab', 'bcd', 'c', 'd'])─┐
│                                              1 │
└────────────────────────────────────────────────┘
```

Query:

```sql theme={null}
SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 2;
```

Result:

```text theme={null}
Exception: Regexp length too large.
```

**See Also**

* [max\_hyperscan\_regexp\_total\_length](https://clickhouse.com/docs/reference/settings/session-settings/max-hyperscan.md#max_hyperscan_regexp_total_length)

## max\_hyperscan\_regexp\_total\_length

Type

UInt64

Default

0

Sets the maximum length total of all regular expressions in each [hyperscan multi-match function](https://clickhouse.com/docs/reference/functions/regular-functions/string-search-functions.md#multiMatchAny).

Possible values:

* Positive integer.
* 0 - The length is not limited.

**Example**

Query:

```sql theme={null}
SELECT multiMatchAny('abcd', ['a','b','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5;
```

Result:

```text theme={null}
┌─multiMatchAny('abcd', ['a', 'b', 'c', 'd'])─┐
│                                           1 │
└─────────────────────────────────────────────┘
```

Query:

```sql theme={null}
SELECT multiMatchAny('abcd', ['ab','bc','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5;
```

Result:

```text theme={null}
Exception: Total regexp lengths too large.
```

**See Also**

* [max\_hyperscan\_regexp\_length](https://clickhouse.com/docs/reference/settings/session-settings/max-hyperscan.md#max_hyperscan_regexp_length)
