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

# string\_split\_regex

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 regexp\_split\_to\_array, str\_split\_regex.

## Try an expression

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

### Expression

```
string_split_regex('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

```
string_split_regex(string, regex, options)
```

**string**

Text

**regex**

Text

**options**

Text

Supported signatures (2)

```
string_split_regex(string: VARCHAR, regex: VARCHAR) → VARCHAR[]
string_split_regex(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\_extract

Return the part of text that matches a regular expression, or empty text if there is no match. An optional constant group number picks a capturing group, and regex options can follow.

](https://oplema.com/docs/strata/functions/regexp-extract)[regexp\_extract\_all

Find every non-overlapping match of a regular expression in text and return them as a list. An optional group number picks a capturing group, and regex options can follow.

](https://oplema.com/docs/strata/functions/regexp-extract-all)[regexp\_full\_match

Check whether all of the text matches a regular expression. An optional argument sets regex options.

](https://oplema.com/docs/strata/functions/regexp-full-match)[regexp\_matches

Check whether text contains a match for a regular expression. An optional argument sets regex options.

](https://oplema.com/docs/strata/functions/regexp-matches)

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

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