Skip to content

Split - cRegEx

Splits the subject string using matches of the expression as delimiters

Type: Function
Return Data Type: String[]

Parameters

Parameter Type Description
sSubject String [ToDo: In Progress]

Syntax

Function Split String sSubject Returns String[]

Call Example

Get Split sSubject to String[]Variable

Description

Splits the subject string using matches of the expression as delimiters. Returns an array of strings.

Returns a string array with the subject string broken into individual strings on each match. If the pattern contains matching groups, the string will be broken on each matching group and not on the full match. The match itself will not be in the string.

Sample

The sample below splits the string on one of multiple separators. The resulting array has values "1" till "6".

Object oStringSplitter is a cRegEx 
    Set psExpression to "[;,\t ]" 
End_Object 

String[] aValues 
Get Split of oStringSplitter "1,2,3,4,5,6" to aValues

Return Value

Array of strings