Split

The Split function returns an array of substrings from a string by using the specified delimiters.

Syntax

The Split function has the following syntax:

Array = Split(Expression, Delimiters)

Parameters

The Split function has the following parameters.

Table 1. Split function parameters

Parameter

Format

Description

Expression

String

String to split into substrings

Delimiters

String

String that contains the delimiter characters.

Return value

Array of substrings.

Example

The following example shows how to split a string into an array of substrings.

MyString = "This is a test.";
Delimiters = " ";
MyArray = Split(MyString, Delimiters);
Log(MyArray);

This example prints the following message to the policy log:

Parser Log: {This, is, a, test.}