The pieces of text between matches.
Regex :: #import "Extensions/Regex";
re, _ := Regex.compile("\\s*,\\s*");
parts := Regex.split(*re, "a , b,c");
assert(parts.count == 3 && parts[1] == "b");
array_free(parts);
Regex.free_regex(*re);split :: (re: *Regex, text: string) -> [..] string
Parameters
- re: *Regex
- text: string
Returns
- [..] string
split :: ($R: Type, text: string) -> [..] string
The pieces of text between matches of the static pattern.
Parameters
- $R: Type
- text: string
Returns
- [..] string
Regex :: #import "Extensions/Regex";
Comma :: Regex.Static(",");
assert(Regex.split(Comma, "a,b,c").count == 3);