SPLIT
Split a text into a list of texts by dividing at the delimiter.
The delimiter is not included in the list.
Usage
SPLIT(text, delimiter, max_parts: 0)
Parameters
text |
(Required) The text to split |
delimiter |
(Required) The delimiter to use for splitting |
max_parts: |
(Named, Required) Maximum number of parts in the resulting list. Use 0 (the default) for any number of parts. |
Parameters with “Named” mean that you must specify the name of the parameter and a colon before its value.
Ex: max_parts: "its value"
Examples
More information
The [
and ]
in the examples represents the beginning and end of lists.
Using INDEX
with SPLIT
allows getting only the part of interest.
If there are too many instances of the delimiter in the text, the last text of the list will include the extra delimiters.
The resulting list may contain empty texts in the following cases:
- there are consecutive delimiters
- there is a delimiter at the beginning of the text
- there is a delimiter at the end of the text