Split
The Split action splits a string.
For example, if an API returns a set of events as a long string, where each event is separated by a comma or other delimiter, you can split the string to use the PostEvent or PostEvents action.
The following table shows the parameters for the Split action.
| Name | Data type | Required | Notes |
|---|---|---|---|
| value | String | Yes | The value to split. |
| delimiter | String | No |
The delimiter is a regex expression. Defaults to "newline". If a delimiter is supplied with regex elements, it must be a Java-type regex. |
| savePath | JPath | Yes | The location to store the result. |
XML Example:
This action splits the string "value 1,value 2,value 3" into an array of three
strings "value1", "value2", and "value3". The
strings are stored in the State at location /values.
<Split value="value 1,value 2,value 3" delimiter="," savePath="/values" />