regexp.splitRegexp() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.65 is the most recent stable version of Flux.

The regexp.splitRegexp() function splits a string into substrings separated by regular expression matches and returns an array of i substrings between matches.

Output data type: Array of Strings

import "regexp"

regexp.splitRegexp(r: /a*/, v: "abaabaccadaaae", i: 5)

// Returns ["", "b", "b", "c", "cadaaae"]



The regular expression used to search v.

Data type: Regexp


The string value to search.

Data type: String


The number of substrings to return.

Data type: Integer