---
title: "regexp_split_to_array function in Strata | Oplema"
description: "Split text at each match of a regular expression and get the parts as a list. Also called string_split_regex. Use it in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/regexp-split-to-array"
updated: "2026-11-04"
---

# regexp\_split\_to\_array

Split text at each match of a regular expression and return the parts as a list. An optional argument sets regex options.

Also available as str\_split\_regex, string\_split\_regex.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **VARCHAR**.

### Expression

```
regexp_split_to_array('hello world; 42', ';? ')
```

### Result

```
'[hello, world, 42]'
```

The expression returns `VARCHAR[]`. Formula stores it as `VARCHAR` in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | \[hello, world, 42\] |

## Arguments and types

```
regexp_split_to_array(string, regex, options)
```

**string**

Text

**regex**

Text

**options**

Text

Supported signatures (2)

```
regexp_split_to_array(string: VARCHAR, regex: VARCHAR) → VARCHAR[]
regexp_split_to_array(string: VARCHAR, regex: VARCHAR, options: VARCHAR) → VARCHAR[]
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[regexp\_replace

Replace the first match of a regular expression in text. Pass the g option to replace every match.

](https://oplema.com/docs/strata/functions/regexp-replace)[ILIKE

Match text against a pattern without distinguishing uppercase and lowercase.

](https://oplema.com/docs/strata/functions/ilike)[LIKE

Match text against a case-sensitive pattern.

](https://oplema.com/docs/strata/functions/like)

[Browse patterns](https://oplema.com/docs/strata/functions#patterns) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/regular_expressions.html#regexp_split_to_arraystring-regex-options)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
