split
FEEL built-in function · FEEL string functions
split(string, delimiter)
Splits the string at every match of the delimiter pattern and returns the parts as a list of strings.
The delimiter is a regular expression. A plain comma or semicolon works as expected, but a dot or a pipe has to be escaped. Empty parts between consecutive delimiters are kept. A pattern such as \\s*,\\s* splits and trims in one step.
Parameters
| Parameter | Type | Description |
|---|---|---|
| string | string | the string to split |
| delimiter | string | regular expression separating the parts |
Examples
split("John Doe", "\\s")
split("a;b;c;;", ";")
Edge cases and null handling
split("a.b.c", ".")
Unescaped, the dot matches every character, which leaves only empty strings.
split("a.b.c", "\\.")
split("", ",")
Part of FEEL string functions: the rules all of them share, string concatenation, regex pitfalls and every function side by side.
Related functions
string join · substring before · substring after
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).