split (Split separated text)

Prev Next

See also: concatWs (Concatenate texts)

The $split() function splits a text at a given character or string and returns the individual parts as a list of texts.

Hint: The optional trim parameter determines whether the individual parts should be freed from leading and trailing whitespaces (spaces, line breaks, tabulators, etc.).

Tooltip

Syntax: $split(text,separator[,trim=false])

Name

Description

text

Any text

separator

A character or string at which the text should be split.If this parameter is empty, a list with the transferred text is returned as entry.

trim

An optional parameter (true/false), which specifies whether the extracted parts should be freed from leading and trailing whitespaces (spaces, line breaks, tabulator, etc.). Default value for trim is false.

Returns a list containing the extracted parts as entries.

Examples:$split(a - b- c - d - e,-) – returns [a , b, c , d , e]$split(a - b- c - d - e,-,$true) – returns [a,b,c,d,e]

Syntax

$split(text,separator[,trim])

Parameter

Name

Description

text

Any text.

separator

A character or string at which the text should be split.

If this parameter is empty, a list with the transferred text is returned as entry.

trim

An optional parameter (true/false), which specifies whether the extracted parts should be freed from leading and trailing whitespaces (spaces, line breaks, tabulator, etc.). Default value for trim is false.

Return value

A list, which contains the extracted parts as entries.

Examples

Syntax

Result

$split(a - b- c - d - e,-)

[a , b, c , d , e]

$split(a - b- c - d - e,-,true)

[a,b,c,d,e]

$split(Jonas Abend IT Manager,Profession,true)

[Jonas Abend,IT Manager]