klyn.regex.RegEx.split
method

    public native split(input as String) as Array<String> throws RegExException:

Description

Splits the input into an array of substrings using the pattern as a delimiter.

Parameters

Parameter | Description
--- | ---
`input` | The string to split.

Returns

An array of substrings.

Throws

- RegExException if the regular expression cannot be evaluated.

Example

    regex = RegEx(r"\s+")
    results = regex.split("123 abc 456")  # results will be ["123", "abc", "456"]