split
To split a string into an array at each separator
This function will split a string into single components. These components are assembled into an array.
The function requires a separator, which indicates where the parts are separated. The separator won’t be included in the string array.
The function can for example help you to process imported data, which contains different information bits in a text field, for example, an address.
If you know the order of your data, you can use item()
to access each element within the generated array again individually.
Syntax
split(string, string)
Return
[string]
Examples
split("Ninox Monbijouplatz 5 10178 Berlin", " ")
Result: Ninox,Monbijouplatz,5,10178,Berlin (with the space being the separator)
item(split("Ninox Software GmbH,Monbijouplatz 5,10178 Berlin", ","), 0)
Result: Ninox Software GmbH
(with the comma ( , ) being the separator and 0 for the first entry. 1 would return Monbijouplatz 5.
See also
concat
, which returns all items of an array in one string.
splitx
, which splits a string into an array by using a regular expression.