regex_split
host callCapy
function regex_split(pattern : string, subject : string, opt : any = {}) anyDescription
regex_split() removes separators and keeps empty parts. opt.flags takes the flag letters described for regex_match().
Parameters
pattern : regular expression separator
subject : text to split
opt : options map with flags
Return Values
A list of text parts.
Example
Capy
var parts := regex_split(",", "a,,b")
print(parts[1], "\n")
Output