---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/regexp-split-to-array.md
cuppy_section: docs
cuppy_doc: TB26-HE9C
cuppy_doc_uuid: a2510c8f-a517-4bbc-b511-2ec35f8058aa
cuppy_permalink: https://cuppy.io/salesforce/d/TB26-HE9C
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/regexp-split-to-array
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: d0f183170984b7abd3858a58cf606609df2298354eeea393d01df396a1fe1105
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/regexp-split-to-array.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## `REGEXP_SPLIT_TO_ARRAY`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Splits a string into an array using a regular expression pattern as the delimiter.

*   `<string>`: The input text string to split.
*   `<pattern>`: The regular expression pattern to use as the delimiter.

*   `flags`: A string of option flags that modify matching behavior. Flags can be combined (for example, `'iq'`).

| Flag | Description |
| --- | --- |
| `i` | Case-insensitive matching |
| `c` | Case-sensitive matching (default) |
| `q` | Treat the pattern as a literal string (disables regex metacharacters) |

Returns an array of text values containing all substrings after splitting the input string using the pattern as a delimiter.

*   **Empty input string**: Returns an array with a single empty string `[""]`.
*   **Empty pattern**: Splits the string into individual characters, including Unicode characters.
*   **Boundary matches**: When the pattern matches at the start or end of the string, empty strings are included in the result array.
*   **Consecutive matches**: Empty strings appear between consecutive delimiter matches.
*   **Invalid patterns**: Throws an error for invalid regex patterns (for example, unsupported lookbehind assertions, invalid quantifiers like `.*+`).
*   **Unicode support**: Handles multi-byte Unicode characters correctly.
*   For simple delimiters without regex features, consider using [SPLIT](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/split.html) instead.
*   For detailed regex syntax, see [Regular Expression Syntax](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string-matching.html#regular-expression-syntax).

Split a string on one or more whitespace characters.

Returns `array['First', 'Last']`.

Split using a character class to match multiple delimiters.

Returns `array['abc', '', '', 'XYZ']`. Note the empty strings between consecutive digit matches.

Returns `array['abc', 'XYZ']`. Note there are no empty strings between consecutive digit matches, because the digits were matched as a group.

An empty pattern splits the string into individual characters.

Returns `array['a', 'b', 'c']`.

Returns `array['a', 'é', 'é']`. Unicode characters are handled correctly.

When the pattern matches at the start or end, empty strings are included.

Returns `array['', '', '']`. The pattern matches twice, creating three segments (all empty).

Use the `i` flag for case-insensitive delimiter matching.

Returns `array['', '', '']`.

Use the `q` flag to treat the pattern as a literal string, disabling regex metacharacters.

Returns `array['', '']`. Without the `q` flag, `\d` would match any digit.

Combine flags for case-insensitive literal matching.

Returns `array['', '']`.

Use word boundary anchors for precise matching.

Returns `array['', ' and dogs']`.

Returns `array['cats ', ' the flat']`. Matches only the standalone word “at”.

Escape regex metacharacters to match them literally.

Returns `array['', '']`.

Returns `array['', '']`.

*   [SPLIT](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/split.html)
*   [SPLIT_PART](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/split-part.html)
*   [REGEXP_SUBSTR](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/regexp-substr.html)
*   [Regular Expression Syntax](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string-matching.html#regular-expression-syntax)


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
