arraySplit
Description
Returns an array of substrings by splitting a string using the specified delimiter.
- The delimiter can be either a
string
or aregexp
.
Syntax
Like many functions in DataPrime, arraySplit
supports two notations, function and method notation. These interchangeable forms allow flexibility in how you structure expressions.
Arguments
Name | Type | Required | Description |
---|---|---|---|
string | string | true | The string to split |
delimiter | regexp | string | true |
Example
Use case: Extract first and last names from a full name
Suppose you have a field containing a full name. Consider the following input:
By splitting the name
field on a space, you can extract the first and last names into separate fields.
Output
The result will include new fields for the first and last names:
Theme
Light